@Test
    public void connectionCloseHeaderInResponse() throws Exception {
        try (ServerSocket ss = new ServerSocket(0);) {
            final int port = ss.getLocalPort();

            final WebClient client = WebClient.of("h1c://127.0.0.1:" + port);
            client.get("/").aggregate();

            try (Socket s = ss.accept()) {
                final BufferedReader in = new BufferedReader(
                        new InputStreamReader(s.getInputStream(), StandardCharsets.US_ASCII));
                final OutputStream out = s.getOutputStream();
                assertThat(in.readLine()).isEqualTo("GET / HTTP/1.1");
                assertThat(in.readLine()).startsWith("host: 127.0.0.1:");
                assertThat(in.readLine()).startsWith("user-agent: armeria/");
                assertThat(in.readLine()).isEmpty();

                out.write(("HTTP/1.1 200 OK\r\n" +
                           "Connection: close\r\n" +
                           "Content-Length: 0\r\n" +
                           "\r\n").getBytes(StandardCharsets.US_ASCII));

                assertThat(in.readLine()).isNull();
            }
        }
    }
Makes sure an HTTP/1 client closes the connection when it receives a response with
a {@code "connection: close"} header.
core/src/test/java/com/linecorp/armeria/client/Http1ConnectionCloseHeaderTest.java