Can Mockito verify parameters based on their values at the time of method call?

Use an Answer to check the value of the argument when the method is called. You can either throw an AssertionError within the Answer if the value is wrong, or you can store the value, and do your assertion at the end.

Leave a Comment