Closed sunmingtao closed 2 years ago
Solution is replace Mockito.any(Class.class)
with Mockito.eq(List.class)
Mockito.when(
restTemplate.exchange(
Mockito.eq(
String.format(AchievementService.ACHIEVEMENT_URL_TEMPLATE, TROVE_VUE_API_HOME)),
Mockito.any(HttpMethod.class),
Mockito.any(HttpEntity.class),
Mockito.eq(List.class)))
.thenReturn(responseEntity);
Prod code:
Unit test code:
Unit test runs fine in Intellij. However, when running
mvn clean test
on command line, showing error