serviceListenerMock.serviceAdded(capture(capServiceAddedEvent));
serviceListenerMock.serviceResolved(capture(capServiceResolvedEvent));
replay(serviceListenerMock);
registry = JmDNS.create();
registry.addServiceListener(service.getType(), serviceListenerMock);
registry.registerService(service);
// We get the service added event when we register the service. However the service has not been resolved at this point.
// The info associated with the event only has the minimum information i.e. name and type.
assertTrue("We did not get the service added event.", capServiceAddedEvent.hasCaptured());