mockito
mockito copied to clipboard
refactor: verifyNoMoreInteractions error message does not provide a way to solve the issue.
Description
the error that is in the console is not helpful in solving the issue.
for me, through trial and error I discovered that I should verify each call for verifyNoMoreInteractions to work.
So I suggest adding a "Did you do the following ..." helper when printing the error in the console.
Now:
No more calls expected, but following found: MockCat.meow()
Proposal:
No more calls expected, but following found: MockCat.meow()
Tip: Make sure you verified every call for the mock you are running verifyNoMoreInteractions on.
Use verify(...).called(...).