To solve this problem, you should:
// If you define one matcher for an expected argument, you need to define them for all the arguments! expect(service.findFoos(isA(FooSearchCriteria), eq(maxResults), aryEq(sortCriteria))).andReturn(expectedResult)
See
http://www.nearinfinity.com/blogs/scott_leberknight/the_n_matchers_expected_m.html