@Test
    void ignoresAfterTrailersIsWritten() {
        final HttpResponseWriter res = HttpResponse.streaming();
        res.write(ResponseHeaders.of(100));
        res.write(HttpHeaders.of(HttpHeaderNames.of("a"), "b"));
        res.write(ResponseHeaders.of(200));
        res.write(HttpHeaders.of(HttpHeaderNames.of("c"), "d")); // Split headers is trailers.

        // Ignored after trailers is written.
        res.write(HttpData.ofUtf8("foo"));
        res.write(HttpHeaders.of(HttpHeaderNames.of("e"), "f"));
        res.write(HttpHeaders.of(HttpHeaderNames.of("g"), "h"));
        res.close();

        final AggregatedHttpResponse aggregated = res.aggregate().join();
        // Informational headers
        assertThat(aggregated.informationals()).containsExactly(
                ResponseHeaders.of(HttpStatus.CONTINUE, HttpHeaderNames.of("a"), "b"));
        // Non-informational header
        assertThat(aggregated.headers()).isEqualTo(ResponseHeaders.of(200));

        assertThat(aggregated.contentUtf8()).isEmpty();
        assertThat(aggregated.trailers()).isEqualTo(HttpHeaders.of(HttpHeaderNames.of("c"), "d"));
    }
The aggregation future must be completed even if the response being aggregated has been aborted.
core/src/test/java/com/linecorp/armeria/internal/common/DefaultHttpResponseTest.java