Open
Description
Spring Framework provides MockRestServiceServer for testing the imperative stack (RestTemplate
, RestClient
, etc).
However, the team has decided not to provide similar support for WebClient because mock servers like OkHttp and Wire Mock exist. The reference documents that using mock servers like OkHttp are the preferred way to test WebClient
tests.
This causes a mismatch between the imperative and reactive worlds.
It would be nice to update the imperative documentation to recommend mock servers for testing imperative clients. This would align the two stacks and make it clear what is considered best practice.