}
@Test
public void testRegisterService() throws IOException, InterruptedException {
System.out.println("Unit Test: testRegisterService()");
JmmDNS registry = null;
try {
registry = JmmDNS.Factory.getInstance();
registry.registerService(service);
Thread.sleep(20000);
ServiceInfo[] services = registry.list(service.getType());
assertTrue("We should see the service we just registered: ", services.length > 0);
assertEquals(service, services[0]);
} finally {
if (registry != null) registry.close();
}
}