I’m getting mockito exception when doing the stubbing:
@Mock
RetryTemplate retryTemplate;
@Test
public void testSubmitCreditTransaction() {
when(retryTemplate.execute(any())).thenAnswer(invocation -> {
RetryCallback retry = invocation.getArgument(0);
return retry.doWithRetry(null);
});
...
}
the exception is:
org.mockito.exceptions.misusing.InvalidUseOfMatchersException
what did I get wrong?