I'm writing an ArgumentMatcher and the guts of the comparison come down to something like:
return A.value().equals(B.value()) && A.name().equals(B.name());
Unfortunately, when the doesn't pass, Mockito just tells me it failed. I want to add a custom message like "Values don't match" or "Names don't match" (of course I'd like to give more info, but until I can figure out this simple case, what's the point of going any further).
Previously (before working with Mockito), I remember matchers having two methods - one to check the match and one to generate a failure message (true, it was a pain to write both methods, but I miss the second method now).
Any idea how to do this? Any help is appreciated!