assertNotNull(server);
server.start();
final CountDownLatch latch = new CountDownLatch(1);
final AtomicReference<StringBuffer> response = new AtomicReference<StringBuffer>(new StringBuffer());
SerializedClient client = ClientFactory.getDefault().newClient(SerializedClient.class);
SerializedOptionsBuilder b = client.newOptionsBuilder();
b.serializedFireStage(new DefaultSerializedFireStage());
RequestBuilder request = client.newRequestBuilder()
.method(Request.METHOD.GET)
.uri(targetUrl + "/suspend")
.transport(transport());
Socket socket = client.create(b.build());
socket.on("message", new Function<String>() {
@Override
public void on(String t) {
logger.info("Serialized Function invoked {}", t);