server.start();
barrier.await();
ConnectCallback callback = mock(ConnectCallback.class);
MessageDecoder decoder = mock(MessageDecoder.class);
MessageListener listener = mock(MessageListener.class);
ConnectConfig config = new ConnectConfig();
config.setFactory(SocketChannels.getFactory());
config.setAddress(new InetSocketAddress(PORT));