java - Mockito: InvalidUseOfMatchersException - Stack Overflow
The error message outlines the solution pretty clearly. The line
doNothing().when(cmd).dnsCheck(HOST, any(InetAddressFactory.class)) uses one raw value and one matcher, when it's required to use either all raw values or all matchers. A correct version might read
doNothing().when(cmd).dnsCheck(eq(HOST), any(InetAddressFactory.class))Read full article from java - Mockito: InvalidUseOfMatchersException - Stack Overflow
No comments:
Post a Comment