Accepted answer

Your problem is that you're using equality in the first parameter and matcher for the second one. Try using matchers for all arguments.

But a bigger problem that I feel here is that you're trying to mock 3rd party library - this is something you should avoid. This would also solve your problem. Here's some extra read about it - TDD best practices: don't mock others

Related Query

More Query from same tag