Closed
Description
Andreas Hubmer opened SPR-10885 and commented
In case a mocked method is called too often an IllegalStateException is thrown. In the exception text the number of expected calls and the number of received calls are printed. The number of received calls is off by one (too low).
Concerned method:
org.springframework.mock.staticmock.AbstractMethodMockingControl.nextCall()
Example:
java.lang.IllegalStateException: Expected 1 calls, received 1
Correct would be:
java.lang.IllegalStateException: Expected 1 calls, received 2
Affects: 3.1.2
Issue Links:
- Fix off-by-one regression in AbstractMethodMockingControl [SPR-11385] #16012 Fix off-by-one regression in AbstractMethodMockingControl