Is this possible?
I tried with EasyMock.expectLastCall().times(0);
but EasyMock complains that times must be >=1
You could use .andThrow(new AssertionFailedError()).anyTimes();
- this is the same exception that Assert.fail()
throws, but is less verbose than making an Answer
.