@ParameterizedTest
    @EnumSource(value = SessionProtocol.class, names = { "H1C", "H2C" })
    void throwingHandler(SessionProtocol sessionProtocol) throws Exception {
        final AggregatedHttpResponse res = WebClient.builder(sessionProtocol, server.httpEndpoint())
                                                    .build().blocking().get("/throwing");
        assertThat(res.status().code()).isEqualTo(500);

        assertThat(server.requestContextCaptor().size()).isEqualTo(1);
        final ServiceRequestContext sctx = server.requestContextCaptor().poll();
        await().atMost(10, TimeUnit.SECONDS).until(() -> sctx.log().isComplete());
        assertThat(sctx.log().ensureComplete().responseCause()).isSameAs(RUNTIME_EXCEPTION);
    }
Makes sure asynchronous streaming works for various sizes of responses.
jetty/jetty12/src/test/java/com/linecorp/armeria/server/jetty/JettyServiceTest.java