@Before public void setUp() throws InterruptedException { MockLogAppender.setupLogging(); m_detector.setRetries(1); m_detector.setTimeout(500); m_detector.setWin32ServiceName("VMware Tools Service"); }
@Test(timeout = 90000) public void testDetectorFail() throws UnknownHostException { m_detector.setWin32ServiceName("This service does not exist"); assertFalse(m_detector.isServiceDetected(InetAddressUtils.addr(TEST_IP_ADDRESS))); }
@Test(timeout = 90000) public void testDetectorSuccessful() throws UnknownHostException { assertTrue(m_detector.isServiceDetected(InetAddressUtils.addr(TEST_IP_ADDRESS))); }