모키 토 : InvalidUseOfMatchersException DNS 확인을 수행하는 명령 줄 도구가 있습니다. DNS 확인에 성공하면 명령은 추가 작업을 진행합니다. Mockito를 사용하여 단위 테스트를 작성하려고합니다. 내 코드는 다음과 같습니다. public class Command() { // .... void runCommand() { // .. dnsCheck(hostname, new InetAddressFactory()); // .. // do other stuff after dnsCheck } void dnsCheck(String hostname, InetAddressFactory factory) { // calls to verify hostname } } InetAddress클래스 ..