I have the following method that I wish to verify behaviour on.
public void methodToTest(Exception e, ActionErrors errors) { ... errors.add("exc
You can use Mockito.atLeastOnce() which allows Mockito to pass the test even if that mockObject will be called many times.
Mockito.atLeastOnce()
Mockito.verify(mockObject, Mockito.atLeastOnce()).testMethod(Mockito.eq(1)); Mockito.verify(mockObject, Mockito.atLeastOnce()).testMethod(Mockito.eq(2));