Interface FakeResolution

All Known Implementing Classes:
FakeResolution.Found, FakeResolution.KeyAbsent, FakeResolution.RunNotScripted

public sealed interface FakeResolution permits FakeResolution.Found, FakeResolution.RunNotScripted, FakeResolution.KeyAbsent
Outcome of a single FakeResponseSource.nextResponse(FakeInvocation) call. A sealed result (rather than a bare Optional) so the client can raise the two distinct fail-closed errors — "no script registered for this run" versus "this key is absent from the run's script" — from one atomic call, with no time-of-check/time-of-use gap and no second query method.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    A scripted response was found for the invocation's key.
    static final record 
    A script is registered for the run, but it has no entry for this key (the ordinal counter has already advanced past the miss — acceptable, since a miss is a fail-closed terminal).
    static final record 
    No script is registered for the invocation's run.