Spring Web Reactive | 4. Testing
The same applies to Spring MVC
The spring-test module provides mock implementations of ServerHttpRequest, ServerHttpResponse, and ServerWebExchange. For details about mock objects, see Spring Web Reactive.
WebTestClient supports testing WebFlux applications without a running HTTP server by using these mock request and response objects. You can also use WebTestClient for end-to-end integration tests.