EasyMock: test that method in mock isn’t called
I know this question is very old but I had the same question as the OP and did some more looking around. I found the following solution: By adding .andThrow(new AssertionFailedError()).anyTimes(); at the end of your EasyMock declaration the test will fail when the mocked method is called. The reason this is better than simply … Read more