Skip to content

Instantly share code, notes, and snippets.

@tzachz
Created September 17, 2019 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tzachz/f377c52454a50239fe5a91a834a30f34 to your computer and use it in GitHub Desktop.
Save tzachz/f377c52454a50239fe5a91a834a30f34 to your computer and use it in GitHub Desktop.
Mockito gotcha: matchers sources
public static <T> T any() {
return (T) anyObject();
}
public static <T> T anyObject() {
return (T) reportMatcher(Any.ANY).returnNull();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment