try {
discoveryAdvertiser.registerService(serviceInfo);
} catch (ECFRuntimeException e) {
fail("Registering a service failed on a new IDCA");
}
CompositeDiscoveryContainer cdc = (CompositeDiscoveryContainer) discoveryLocator;
testDiscoveryContainer = new TestDiscoveryContainer();
assertTrue(cdc.addContainer(testDiscoveryContainer));
List registeredServices = testDiscoveryContainer.getRegisteredServices();
assertEquals("registerService(aService) wasn't called on TestDiscoveryContainer", serviceInfo, registeredServices.get(0));
} finally {
CompositeDiscoveryContainer cdc = (CompositeDiscoveryContainer) discoveryLocator;
cdc.removeContainer(testDiscoveryContainer);
}
}