@Test
    void testAsyncBody() throws Exception {
        final int byteCount = 20000;
        server.expect().withPath("/async").andReturn(200,
                                                     new String(new byte[byteCount], StandardCharsets.UTF_8))
              .always();

        final CompletableFuture<Integer> consumed = new CompletableFuture<>();
        final AtomicInteger total = new AtomicInteger();

        final CompletableFuture<HttpResponse<AsyncBody>> responseFuture = client.getHttpClient().consumeBytes(
                client.getHttpClient().newHttpRequestBuilder()
                      .uri(URI.create(client.getConfiguration().getMasterUrl() + "async"))
                      .build(),
                (value, asyncBody) -> {
                    value.stream().map(ByteBuffer::remaining).forEach(total::addAndGet);
                    asyncBody.consume();
                });

        responseFuture.whenComplete((r, t) -> {
            if (t != null) {
                consumed.completeExceptionally(t);
            }
            if (r != null) {
                r.body().consume();
                r.body().done().whenComplete((v, ex) -> {
                    if (ex != null) {
                        consumed.completeExceptionally(ex);
                    } else {
                        consumed.complete(total.get());
                    }
                });
            }
        });

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