}
@Test
public void testAutoReconnect() throws Exception {
TCPController server = new TCPController();
server.setHandler(new HandlerAdapter());
server.bind(new InetSocketAddress(7171));
this.hsClient.shutdown();
this.hsClient = new HSClientImpl(new InetSocketAddress(7171), 5);
Thread.sleep(1000);
assertEquals(5, server.getSessionSet().size());
server.stop();
Thread.sleep(5000);
server = new TCPController();
server.setHandler(new HandlerAdapter());
server.bind(new InetSocketAddress(7171));
Thread.sleep(10000);
assertEquals(5, server.getSessionSet().size());
}