Does the new RestClient introduced in Spring Framework 6.1 have a variant suitable for testing like RestTemplate had with TestRestTemplate?

In spring framework 6.1, a new synchronous HTTP client RestClient was introduced. See also:

It aims to replace the existing RestTemplate.

In Spring Boot, there was a TestRestTemplate which could be used for integration tests. See also:

However, I could not find any mention of a variant for RestClient. What is the recommended way to do integration testing using RestClient ?


  • There's no test variant of RestClient. This Spring Framework issue is tracking a RestClient equivalent of WebClient's WebTestClient.