Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract method mocking prints wrong call count in exception [SPR-10885] #15513

spring-projects-issues opened this issue Sep 2, 2013 · 0 comments


Copy link

@spring-projects-issues spring-projects-issues commented Sep 2, 2013

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:

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:

  • #16012 Fix off-by-one regression in AbstractMethodMockingControl

Referenced from: commits 03e243a, 5596154, 3ca0dcd, 69a89b1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants