Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Verification count of stubbed method on spy is wrong for some method implementations #504
What steps will reproduce the problem? 1. Run TimesExampleTest, see 'testSpy_Bad'. What is the expected output? What do you see instead? Expected a passing test, but fails with 3 invocations, instead of 2. What version of the product are you using? On what operating system? junit:junit:4.11
If you comment out the @PrepareForTest line, and just use Mockito, both test methods will now pass.
Code example on gist
referenced this issue
Jul 25, 2015
Did the attachments for this come over when migrating from google code? The link seems to dump me back into google code...
I'm going through an upgrade from 1.5.4. to 1.6.4 and verification counts on spys appears to have even more issues than before. I was going to try to update the attached test cases.