I am writing unit test for some java spark program with Mockito, I got problem when I try to define the behavior of the method of a mocked object like:
when(mock.method(someRDD)).thenReturn(0);
Since RDD doesn't re-implements equals() function, the mocked behavior works only the rdd passed in the methods is the same reference of this "someRDD".
I wonder if there is any way to customize the "equals()" check behavior in Mockito in mocking methods ? or maybe I should use some other mock framework instead?