java.lang.IllegalStateException: Unable to use auto-configured MockRestServiceServer since a mock server customizer has not been bound to a RestTemplate or RestClient
Реализация у меня такая: [code]@Service class AbcService {
private final RestClient client;
public AbcService(@Value("url") final String url) { this.restClient = RestClient.builder().baseUrl(url).build(); }
String getPlace(String id) { return restClient.get() .uri("places/{id}", id) .retrieve() .body(String.class); } } [/code] и я попробовал протестировать с помощью MockRestServiceServer, но у меня это не сработало — у меня ошибка [code]java.lang.IllegalStateException: Unable to use auto-configured MockRestServiceServer since a mock server customizer has not been bound to a RestTemplate or RestClient [/code] тест [code]@RestClientTest(AbcService.class) class AbcServiceTest { @Autowired AbcService instance;