I just found this thread, and it helped me solve the problem for which I was stuck for a good hour.
I think that I would share my 2 cents:
If you donβt care about the date value and just want to know that it is a Date object, just use the predefined EasyMock connector:
EasyMock.expect(objectMock.isPollingTimeOut(EasyMock.eq(600000L), EasyMock.isA(Date.class), EasyMock.eq(someMock))).andReturn(false);
Remember, once you use the helper, you must use matches for all arguments in the method you are testing, for example, what I did.
source share