Uses of Class
org.mockserver.client.MockServerClient

Packages that use MockServerClient
  • Uses of MockServerClient in org.mockserver.client

    Modifier and Type
    Method
    Description
    MockServerClient.advanceClock(Duration duration)
    Advance the MockServer clock by the specified duration.
    MockServerClient.clear(String expectationId)
    Clear all expectations and logs that match the expectation id
    MockServerClient.clear(String expectationId, org.mockserver.model.ClearType type)
    Clear expectations, logs or both that match the expectation id
    MockServerClient.clear(org.mockserver.model.ExpectationId expectationId)
    Clear all expectations and logs that match the expectation id
    MockServerClient.clear(org.mockserver.model.ExpectationId expectationId, org.mockserver.model.ClearType type)
    Clear expectations, logs or both that match the expectation id
    MockServerClient.clear(org.mockserver.model.RequestDefinition requestDefinition)
    Clear all expectations and logs that match the request matcher
    MockServerClient.clear(org.mockserver.model.RequestDefinition requestDefinition, org.mockserver.model.ClearType type)
    Clear expectations, logs or both that match the request matcher
    MockServerClient.clearBreakpointMatchers()
    Clear all registered breakpoint matchers.
    MockServerClient.clearByNamespace(String namespace)
    Clear only the expectations belonging to a single namespace (tenant), leaving expectations in other namespaces and global (no-namespace) expectations intact.
    MockServerClient.clearGrpcDescriptors()
     
    MockServerClient.clearLoadScenarios()
    Remove all registered load scenarios via DELETE /mockserver/loadScenario.
    MockServerClient.clearServiceChaos()
    Clear all service-scoped chaos profiles.
    MockServerClient.crud(org.mockserver.model.CrudExpectationsDefinition crudDefinition)
    Register a CRUD simulation that auto-generates RESTful endpoints for a given base path.
    MockServerClient.deleteLoadScenario(String name)
    Remove a single registered load scenario by name via DELETE /mockserver/loadScenario/{name}.
    MockServerClient.freezeClock()
    Freeze the MockServer clock at the current time.
    MockServerClient.freezeClock(Instant instant)
    Freeze the MockServer clock at the specified instant.
    MockServerClient.openUI()
    Launch UI and wait the default period to allow the UI to launch and start collecting logs, this ensures that the log are visible in the UI even if MockServer is shutdown by a test shutdown function, such as After, AfterClass, AfterAll, etc
    MockServerClient.openUI(TimeUnit timeUnit, long pause)
    Launch UI and wait a specified period to allow the UI to launch and start collecting logs, this ensures that the log are visible in the UI even if MockServer is shutdown by a test shutdown function, such as After, AfterClass, AfterAll, etc
    MockServerClient.removeBreakpointMatcher(String id)
    Remove a breakpoint matcher by id.
    MockServerClient.removeServiceChaos(String host)
    Remove the service-scoped chaos profile registered for the given host.
    MockServerClient.reset()
    Reset MockServer by clearing all expectations
    MockServerClient.resetClock()
    Reset the MockServer clock to real wall-clock time.
    MockServerClient.setProxyConfiguration(org.mockserver.proxyconfiguration.ProxyConfiguration proxyConfiguration)
    Deprecated.
    use withProxyConfiguration which is more consistent with MockServer API style
    MockServerClient.setRequestOverride(org.mockserver.model.HttpRequest requestOverride)
    Deprecated.
    use withRequestOverride which is more consistent with MockServer API style
    MockServerClient.setServiceChaos(String host, org.mockserver.model.HttpChaosProfile chaos)
    Register a service-scoped HTTP chaos profile for an upstream host.
    MockServerClient.setServiceChaos(String host, org.mockserver.model.HttpChaosProfile chaos, long ttlMillis)
    Register a service-scoped HTTP chaos profile for an upstream host that auto-reverts after ttlMillis milliseconds (a "dead-man's switch" so the chaos self-heals even if removeServiceChaos(String) / clearServiceChaos() is never called).
    MockServerClient.uploadGrpcDescriptor(byte[] descriptorSetBytes)
     
    MockServerClient.verify(Integer maximumNumberOfRequestToReturnInVerificationFailure, org.mockserver.model.ExpectationId... expectationIds)
    Verify a list of requests have been sent in the order specified for example:
    MockServerClient.verify(Integer maximumNumberOfRequestToReturnInVerificationFailure, org.mockserver.model.RequestDefinition... requestDefinitions)
    Verify a list of requests have been sent in the order specified for example:
    MockServerClient.verify(String... expectationIds)
    Verify a list of requests have been sent in the order specified for example:
    MockServerClient.verify(String expectationId, org.mockserver.verify.VerificationTimes times)
    Verify a request has been sent for example:
    MockServerClient.verify(org.mockserver.model.ExpectationId... expectationIds)
    Verify a list of requests have been sent in the order specified for example:
    MockServerClient.verify(org.mockserver.model.ExpectationId expectationId, org.mockserver.verify.VerificationTimes times)
    Verify a request has been sent for example:
    MockServerClient.verify(org.mockserver.model.ExpectationId expectationId, org.mockserver.verify.VerificationTimes times, Integer maximumNumberOfRequestToReturnInVerificationFailure)
    Verify a request has been sent for example:
    MockServerClient.verify(org.mockserver.model.HttpResponse httpResponse)
    Verify a response has been recorded (matching any request), defaulting to at least once
    MockServerClient.verify(org.mockserver.model.HttpResponse httpResponse, org.mockserver.verify.VerificationTimes times)
    Verify a response has been recorded (matching any request) for example:
    MockServerClient.verify(org.mockserver.model.RequestDefinition... requestDefinitions)
    Verify a list of requests have been sent in the order specified for example:
    MockServerClient.verify(org.mockserver.model.RequestDefinition requestDefinition, org.mockserver.model.HttpResponse httpResponse, org.mockserver.verify.VerificationTimes times)
    Verify a request-response pair has been recorded for example:
    MockServerClient.verify(org.mockserver.model.RequestDefinition requestDefinition, org.mockserver.verify.VerificationTimes times)
    Verify a request has been sent for example:
    MockServerClient.verify(org.mockserver.model.RequestDefinition requestDefinition, org.mockserver.verify.VerificationTimes times, Integer maximumNumberOfRequestToReturnInVerificationFailure)
    Verify a request has been sent for example:
    MockServerClient.verify(org.mockserver.model.RequestDefinition requestDefinition, org.mockserver.verify.VerificationTimes times, Duration timeout)
    Eventual verification: poll the event log, retrying the supplied verification until it passes or the timeout expires.
    MockServerClient.verify(org.mockserver.verify.Verification verification)
    Verify using a pre-built Verification object for advanced use cases such as request-response pair verification:
    MockServerClient.verify(org.mockserver.verify.Verification verification, Duration timeout)
    Eventual verification: poll the event log, retrying the supplied Verification until it passes or the timeout expires.
    MockServerClient.verify(org.mockserver.verify.VerificationSequence verificationSequence)
    Verify using a pre-built VerificationSequence object for advanced use cases such as request-response sequence verification:
    MockServerClient.verifyAll(org.mockserver.verify.Verification... verifications)
    Verify multiple verifications, collecting all failures and throwing a single AssertionError that lists every mismatch.
    MockServerClient.verifyAsyncMessage(String verificationJson)
    Verify async messages recorded by subscribers against the given criteria.
    MockServerClient.verifyNever(org.mockserver.model.RequestDefinition requestDefinition, Duration window)
    Negative-within-timeout verification: assert that the supplied verification stays unsatisfied for the whole window.
    MockServerClient.verifyNever(org.mockserver.verify.Verification verification, Duration window)
    Negative-within-timeout verification: assert that the supplied Verification stays unsatisfied for the whole window.
    MockServerClient.verifyZeroInteractions()
    Verify no requests have been sent.
    MockServerClient.withControlPlaneJWT(String controlPlaneJWT)
    Specify JWT to use for control plane authorisation
    MockServerClient.withControlPlaneJWT(Supplier<String> controlPlaneJWTSupplier)
    Specify JWT supplier to use for control plane authorisation
    MockServerClient.withProxyConfiguration(org.mockserver.proxyconfiguration.ProxyConfiguration proxyConfiguration)
    Configure communication to MockServer to go via a proxy
    MockServerClient.withRequestOverride(org.mockserver.model.HttpRequest requestOverride)
     
    MockServerClient.withSecure(boolean secure)
     
    Methods in org.mockserver.client that return types with arguments of type MockServerClient
    Modifier and Type
    Method
    Description
    MockServerClient.stop(boolean ignoreFailure)
    Stop MockServer gracefully (only support for Netty version, not supported for WAR version)
    MockServerClient.stopAsync()
    Stop MockServer gracefully (only support for Netty version, not supported for WAR version)
    Methods in org.mockserver.client with parameters of type MockServerClient
    Modifier and Type
    Method
    Description
    org.mockserver.mock.Expectation[]
    A2aMockBuilder.applyTo(MockServerClient client)
     
    org.mockserver.mock.Expectation[]
    LlmConversationBuilder.applyTo(MockServerClient client)
    Build all turn expectations and register them with the MockServerClient.
    org.mockserver.mock.Expectation[]
    LlmFailoverBuilder.applyTo(MockServerClient client)
    Build and register all expectations with the MockServerClient.
    org.mockserver.mock.Expectation[]
    LlmMockBuilder.applyTo(MockServerClient client)
    Build the expectation and register it with the MockServerClient.
    org.mockserver.mock.Expectation[]
    McpMockBuilder.applyTo(MockServerClient client)
     
    org.mockserver.mock.Expectation[]
    TurnBuilder.applyTo(MockServerClient client)
    Shortcut: build and register all turns with the MockServerClient.
  • Uses of MockServerClient in org.mockserver.client.initialize

    Methods in org.mockserver.client.initialize with parameters of type MockServerClient
    Modifier and Type
    Method
    Description
    void
    ExpectationInitializer.initializeExpectations(MockServerClient mockServerClient)
    Deprecated.
     
    void
    PluginExpectationInitializer.initializeExpectations(MockServerClient mockServerClient)