I am trying to use a mock and check that the argument passed into the mock is the correct ArrayList<MyModel>. I have defined the boolean equals method on MyModel, but I can't find the right matcher that uses the equals method. The matchers I have been writing only compare the object_id's which are obviously different. My test looks something like so:
MainActivity activity = mock(MainActivity.class);
MyRequest subject = new MyRequest(activity);
ArrrayList<MyModel> list = ...;
subject.makeRequest();
verify(activity).handleSuccess(argThat(is(list)));
Does anyone know a matcher that will use the boolean equal on MyModel?