@Override
        protected void configure(ServerBuilder sb) {
            sb.service("/trailers", (ctx, req) -> {
                final HttpResponseWriter writer = HttpResponse.streaming();

                final ResponseHeaders headers = ResponseHeaders.of(HttpStatus.OK);
                assertThat(headers.isEndOfStream()).isFalse();

                final HttpHeaders trailers = HttpHeaders.builder()
                                                        .set("armeria-message", "error")
                                                        .endOfStream(true)
                                                        .build();
                assertThat(trailers.isEndOfStream()).isTrue();

                writer.write(headers);
                writer.write(trailers);
                writer.close();

                return writer;
            });

            sb.service("/trailers-only", (ctx, req) -> {
                final HttpResponseWriter writer = HttpResponse.streaming();

                final ResponseHeaders trailers = ResponseHeaders.builder(HttpStatus.OK)
                                                                .set("armeria-message", "error")
                                                                .endOfStream(true)
                                                                .build();
                assertThat(trailers.isEndOfStream()).isTrue();

                writer.write(trailers);
                writer.close();

                return writer;
            });

            sb.decorator(LoggingService.newDecorator());
        }
Test for issues that may happen when doing simple proxying.
it/server/src/test/java/com/linecorp/armeria/server/http/HttpProxyIntegrationTest.java