### Question:
ConsoleCommunicationImplementation implements ConsoleCommunication { @PreDestroy public void shutdown() { m_shutdown.set(true); m_processing.set(false); reset(); } ConsoleCommunicationImplementation(Resources resources,
			ConsoleProperties properties, ErrorHandler errorHandler,
			TimeAuthority timeAuthority);  ConsoleCommunicationImplementation(Resources resources,
                                            ConsoleProperties properties,
                                            ErrorHandler errorHandler,
                                            TimeAuthority timeAuthority,
                                            long idlePollDelay,
                                            long inactiveClientTimeOut); MessageDispatchRegistry getMessageDispatchRegistry(); @PreDestroy void shutdown(); boolean processOneMessage(); int getNumberOfConnections(); void sendToAgents(Message message); void sendToAddressedAgents(Address address, Message message);  }### Answer:
@Test public void testShutdown() throws Exception { m_processMessagesThread.start(); new StubConnector(InetAddress.getByName(null).getHostName(), m_properties.getConsolePort(), ConnectionType.AGENT) .connect(); waitForNumberOfConnections(1); m_consoleCommunication.shutdown(); waitForNumberOfConnections(0); }