final SettableFuture<String> res = new SettableFuture<>();
new Thread(new Runnable() {
@Override
public void run() {
while (!eventInput.isClosed() && !res.isDone()) {
final InboundEvent inboundEvent = eventInput.read();
if (inboundEvent == null)
break;
res.set(inboundEvent.readData(String.class));
}
}
}).start();
client.target("http://localhost:8080/ssepublish").request().cookie(session).post(Entity.text("test it"));
assertEquals("test it", res.get());