I am writing a unit test around void function.
Inside that I call another function.
I want to test that this function should be called only once.
If it is getting called 0 or 2 times, it should fail.
I have tried using followings.But even if I remove the function call from code, test does not fail.
EasyMock.expectLastCall().once();
EasyMock.expectLastCall().atLeastOnce();