@Test
    void testOnOpen() throws Exception {
        server.expect().withPath("/foo")
              .andUpgradeToWebSocket()
              .open()
              .done().always();

        final CompletableFuture<Boolean> opened = new CompletableFuture<>();
        final CompletableFuture<Boolean> future =
                client.getHttpClient().newWebSocketBuilder()
                      .uri(URI.create(webSocketMasterUrl() + "foo"))
                      .buildAsync(new Listener() {

                          @Override
                          public void onOpen(WebSocket webSocket) {
                              opened.complete(true);
                          }
                      })
                      .thenCompose(ws -> opened);

        assertThat(future.get(10, TimeUnit.SECONDS)).isTrue();
    }
Tests a {@link HttpClient} at or below the {@link KubernetesClient} level.
kubernetes/src/test/java/com/linecorp/armeria/client/kubernetes/ArmeriaHttpClientTest.java