VertxServerWebSocket extends AbstractServerWebSocket { @Override public <T> T unwrap(Class<T> clazz) { return io.vertx.core.http.ServerWebSocket.class.isAssignableFrom(clazz) ? clazz.cast(socket) : null; } VertxServerWebSocket(io.vertx.core.http.ServerWebSocket socket); @Override String uri(); @Override Set<String> headerNames(); @Override List<String> headers(String name); @Override T unwrap(Class<T> clazz);  }
@Test public void unwrap() throws Throwable { websocketAction(ws -> { threadAssertTrue(ws.unwrap(io.vertx.core.http.ServerWebSocket.class) instanceof io .vertx.core.http.ServerWebSocket); resume(); }); client.connect(new WebSocketAdapter(), URI.create(uri())); await(); }