I'm trying to run this line:
verify(imagesSorterSpy, atLeast(2)).sortImages(anyList(), null);
to verify this method was called with null as second argument.
but i get this error:
rg.mockito.exceptions.misusing.InvalidUseOfMatchersException:
Invalid use of argument matchers!
2 matchers expected, 1 recorded:
This exception may occur if matchers are combined with raw values:
//incorrect:
someMethod(anyObject(), "raw String");
When using matchers, all arguments have to be provided by matchers.
For example:
//correct:
someMethod(anyObject(), eq("String by matcher"));
how can I verify invocation with null as 2nd arg?