Class ExpectationStep


public class ExpectationStep extends ObjectWithJsonToString
Represents a single step in an ordered multi-action expectation pipeline.

Each step carries exactly ONE action target and a responder flag. Steps without responder = true are side-effects (like beforeActions: fire-and-forget webhooks/callbacks). Exactly one step in the list must be marked as the responder; that step's action produces the HTTP response.

Side-effect targets (responder = false)

  • httpRequest — webhook (HTTP call to an external URL)
  • httpClassCallback — server-side class callback
  • httpObjectCallback — WebSocket object callback
  • httpForward — side-effect forward (response discarded)
  • httpOverrideForwardedRequest — side-effect forward-replace

Responder targets (responder = true)

  • httpResponse — static response
  • httpForward — proxy forward (response returned to client)
  • httpOverrideForwardedRequest — forward-replace (response returned)
  • httpClassCallback — class callback response
  • httpObjectCallback — object callback response
  • httpError — connection-level error (cannot combine with other steps)

Side-effect step controls

  • blocking — when true (default) the pipeline waits for completion
  • timeout — max wait for a blocking side-effect
  • failurePolicy — FAIL_FAST or BEST_EFFORT on failure/timeout