I call the performAction method with a list of objects and test it. After calling this method, I modify some of the "objects".
Mockito's error does not allow us to assert that the arguments do not match (showing changed objects), but I can see in debug mode that the objects were correct as needed.
Ideally, this should not happen, since validation should be applied based on when the method was actually called. Does the test check during call verification in the test method than during the call to the bullying method?
Testing class
@Test public void test() throws Exception { List<ABC> objects = new ArrayList<ABC>();
Test Method:
public void performActions(List<ABC> objects) { activity.doActivity(urlObjects2PerformAction);
The error I am getting is as follows (this is for the complete code. I gave the smallest possible snippet):
Argument(s) are different! Wanted: activity.doActivity( ....... ......
source share