@Test
public void testWebsocketStreamCallbackAsynchronously() {
this.server = vertx.createHttpServer(new HttpServerOptions().setPort(HttpTestBase.DEFAULT_HTTP_PORT));
AtomicInteger done = new AtomicInteger();
ServerWebSocketStream stream = server.websocketStream();
stream.handler(req -> { });
ThreadLocal<Object> stack = new ThreadLocal<>();
stack.set(true);
stream.endHandler(v -> {
assertTrue(vertx.context().isEventLoopContext());
assertNull(stack.get());
if (done.incrementAndGet() == 2) {
testComplete();
}