assertNotNull(server);
server.start();
final CountDownLatch latch = new CountDownLatch(1);
final AtomicBoolean hasEchoReplied = new AtomicBoolean(false);
AtmosphereClient client = ClientFactory.getDefault().newClient(AtmosphereClient.class);
final byte[] binaryEcho = new byte[]{1, 2, 3, 4};
RequestBuilder request = client.newRequestBuilder()
.method(Request.METHOD.GET)
.uri(targetUrl + "/suspend")
.header("Content-Type", "application/octet-stream")
.transport(Request.TRANSPORT.LONG_POLLING);
final Socket socket = client.create(client.newOptionsBuilder().build());
final CountDownLatch suspendedLatch = new CountDownLatch(1);
socket.on(new Function<Integer>() {
@Override