int port = serverSocket.getLocalPort();
final NiftyClient client = new NiftyClient();
try {
ListenableFuture<FramedClientChannel> future =
client.connectAsync(new FramedClientConnector(new InetSocketAddress(port)),
TEST_CONNECT_TIMEOUT,
TEST_READ_TIMEOUT,
TEST_WRITE_TIMEOUT,
TEST_MAX_FRAME_SIZE);
// Wait while NiftyClient attempts to connect the channel