I'm getting a NullPointerException when I try to use argThat with verify:
import static org.hamcrest.CoreMatchers.equalTo;
// Causes NPE
verify(collaborator, never()).doSomething(eq("String"), argThat(equalTo(1)));
But other argument matchers seem to work:
// This works as expected
verify(collaborator, never()).doSomething(eq("String"), eq(1));
Am I using argThat incorrectly? I need to use argThat because (unlike the example above), I want to check argThat(not(equalTo(1))). I'm getting the same NPE whether or not I use never(). I'm using mockito-1.9.5-rc1, hamcrest-1.2.1 and junit-4.10.
Thanks,
--Aaron V.
--
You received this message because you are subscribed to the Google Groups "mockito" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mockito/-/yJD14xqksUgJ.
To post to this group, send email to moc...@googlegroups.com.
To unsubscribe from this group, send email to mockito+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mockito?hl=en.