acceptor.bind(new InetSocketAddress(0));
port = acceptor.getLocalAddress().getPort();
acceptor.setFilterChainBuilder(chain);
// create some clients
NioSocketConnector connector = new NioSocketConnector();
connector.setHandler(new IoHandlerAdapter());
SocketAddress remoteAddressClients[] = new SocketAddress[2];
remoteAddressClients[0] = connectAndWrite(connector,0);
remoteAddressClients[1] = connectAndWrite(connector,1);
// wait until Iohandler has received all events
simpleIoHandler.messageSentLatch.await();