@ParameterizedTest
    @EnumSource(value = HttpMethod.class, mode = Mode.EXCLUDE, names = "UNKNOWN")
    void emptyRequest(HttpMethod method) 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.execute(HttpRequest.of(method, "/")).aggregate();

            try (Socket s = ss.accept()) {
                final BufferedReader in = new BufferedReader(
                        new InputStreamReader(s.getInputStream(), StandardCharsets.US_ASCII));
                assertThat(in.readLine()).isEqualTo(method.name() + " / HTTP/1.1");
                assertThat(in.readLine()).startsWith("host: 127.0.0.1:");
                assertThat(in.readLine()).startsWith("user-agent: armeria/");
                if (hasContent(method)) {
                    assertThat(in.readLine()).isEqualTo("content-length: 0");
                }
                assertThat(in.readLine()).isEmpty();
            }
        }
    }
Makes sure an empty HTTP/1 request is sent with or without the {@code content-length} header
for all HTTP methods.
core/src/test/java/com/linecorp/armeria/client/Http1EmptyRequestTest.java