public class ServerRegistryImpTest extends Assert {
@Test
public void testServerRegistryPreShutdown() {
ServerRegistryImpl serverRegistryImpl = new ServerRegistryImpl();
Server server = new DummyServer(serverRegistryImpl);
server.start();
assertEquals("The serverList should have one service", serverRegistryImpl.serversList.size(), 1);
serverRegistryImpl.preShutdown();
assertEquals("The serverList should be clear ", serverRegistryImpl.serversList.size(), 0);
serverRegistryImpl.postShutdown();
assertEquals("The serverList should be clear ", serverRegistryImpl.serversList.size(), 0);