@Test
    void headersOnly() throws Exception {
        final AggregatedHttpResponse res =
                WebClient.of()
                         .get(server.httpUri() + "/headers-only")
                         .aggregate()
                         .join();

        assertThat(res.status()).isSameAs(HttpStatus.NO_CONTENT);
        assertThat(res.headers()).containsAll(HttpHeaders.of("x-headers", "foo"));
        assertThat(res.trailers()).isEmpty();
    }
Captures the exception raised in a Jetty handler block.
jetty/jetty9/src/test/java/com/linecorp/armeria/server/jetty/JettyServiceTest.java