@Test
    void writingAfterCompletion() {
        capturedException.set(null);
        final AggregatedHttpResponse res =
                WebClient.of()
                         .get(server.httpUri() + "/write-after-completion")
                         .aggregate()
                         .join();

        assertThat(res.status()).isSameAs(HttpStatus.OK);
        assertThat(res.contentUtf8()).isEqualTo("before close");
        // An `IOException` should be raised when writing after closing the `ServletOutputStream`.
        await().untilAsserted(() -> assertThat(capturedException).isNotNull());
        final Throwable cause = capturedException.get();
        assertThat(cause).isInstanceOf(IOException.class)
                         .hasMessage("Closed");
    }
An {@link IOException} or {@link EofException} should be raised if a handler closed
its {@code ServletOutputStream} and then tries to write something to it.
jetty/jetty11/src/test/java/com/linecorp/armeria/server/jetty/JettyServiceTest.java