[junit] 如何验证一个方法被mockito verify()调用两次



Answers

Question

我想验证一个方法是否通过mockito验证被调用两次或多次。 我用验证,它抱怨这样:

org.mockito.exceptions.verification.TooManyActualInvocations: 
Wanted 1 time:
But was 2 times. Undesired invocation:



Links