Я пытаюсь смоделировать метод restTeamplate.exchange, но я получаю приведенную ниже ошибку при попытке смоделировать Обмен методом (String, HttpMethod, HttpEntity, Class, Object ...) в типе RestTemplate не применим дляаргументы (String, HttpMethod, HttpEntity, Object)
Mockito.when(restTemplate.exchange(
Matchers.anyString(),
Matchers.any(HttpMethod.class),
Matchers.<HttpEntity<?>> any(),
Matchers.<Object> any())
).thenReturn(myResponse);