Spring Web Reactive | 2. WebClient | 2.9. Testing

To test code that uses WebClient, you can use a mock web server such as OkHttp MockWebServer. For examples, see the Spring Framework test suite’s WebClientIntergrationTests or the OkHttp repository’s static-server sample.