
Test Asynchronous APIs With REST Assured
Wait for asynchronous work without Thread.sleep, covering 202 Accepted, polling a Location with Awaitility, respecting Retry-After, and waiting for any final state before checking which one.

Wait for asynchronous work without Thread.sleep, covering 202 Accepted, polling a Location with Awaitility, respecting Retry-After, and waiting for any final state before checking which one.

Test an API whose third-party dependency you don't control, with REST Assured calling your API and WireMock playing the provider it calls, covering WireMockExtension, request patterns, a stubbed rate, half-even rounding, unmatched requests and input that never reaches the provider.

Make a third-party dependency misbehave on demand, covering server errors, a slow provider with withFixedDelay, a reset connection with Fault, broken JSON, a missing value, rate limiting with Retry-After and an unknown currency, and check what your API's clients see.

Check the requests your API sends to a third party, covering verify(..) with an exact count, query parameters and headers, one retry for a 503, no retry for a 500, and reading recorded requests with findAll(..).

Build stubs that adapt, covering one templated stub for every currency with response-template and {{request.query..}}, and stateful scenarios in which the provider fails twice and recovers, or fails once and is hidden by a retry.

Test a Spring MVC controller with REST Assured's syntax and no server, no socket and no Spring context, using RestAssuredMockMvc's standaloneSetup(..), and learn what that mode leaves out.

Test a Spring Boot controller with its real Spring MVC and Spring Security configuration but no server, using @WebMvcTest, RestAssuredMockMvc and Spring Security's jwt() post-processor, covering readers, writers, 401, 403 insufficient_scope and problem details.

Start the whole Spring Boot application on a free port with @SpringBootTest(webEnvironment = RANDOM_PORT), test it over real HTTP with plain REST Assured, and send real signed JWTs so signature, expiry, audience and scope are all checked.

Learn what Spring Boot 4.1's dependency management decides for REST Assured, JUnit, Jackson and Hamcrest, why the first imported BOM wins, how to order BOMs so the versions you choose apply, and how to check which versions Maven really resolved.

Run Keycloak in Docker with Testcontainers, discover its endpoints with OpenID Connect discovery, get real access tokens with the client credentials grant, and test an API that verifies them against Keycloak's published keys.