@Test
    void continueToSendRequestOnHttp1() throws Exception {
        try (ServerSocket ss = new ServerSocket(0)) {
            ss.setSoTimeout(10000);

            final int port = ss.getLocalPort();
            final WebClient client = WebClient.of("h1c://127.0.0.1:" + port);
            final CompletableFuture<AggregatedHttpResponse> future =
                    client.prepare()
                          .post("/")
                          .content("foo\n")
                          .header(HttpHeaderNames.EXPECT, HttpHeaderValues.CONTINUE)
                          .execute()
                          .aggregate();

            try (Socket s = ss.accept()) {
                final InputStream inputStream = s.getInputStream();
                final BufferedReader in = new BufferedReader(
                        new InputStreamReader(inputStream, StandardCharsets.US_ASCII));
                final OutputStream out = s.getOutputStream();

                assertThat(in.readLine()).isEqualTo("POST / HTTP/1.1");
                assertThat(in.readLine()).startsWith("host: 127.0.0.1:");
                assertThat(in.readLine()).isEqualTo("content-type: text/plain; charset=utf-8");
                assertThat(in.readLine()).isEqualTo("expect: 100-continue");
                assertThat(in.readLine()).isEqualTo("content-length: 4");
                assertThat(in.readLine()).startsWith("user-agent: armeria/");
                assertThat(in.readLine()).isEmpty();

                // Check that the data is not sent until sending 100-continue response.
                Thread.sleep(1000);
                assertThat(inputStream.available()).isZero();

                out.write("HTTP/1.1 100 Continue\r\n\r\n".getBytes(StandardCharsets.US_ASCII));

                assertThat(in.readLine()).isEqualTo("foo");

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

                assertThat(in.readLine()).isNull();

                final AggregatedHttpResponse res = future.join();
                assertThat(res.status()).isEqualTo(HttpStatus.CREATED);
            }
        }
    }
This test is to check the behavior of the HttpClient when the 'Expect: 100-continue' header is set.
core/src/test/java/com/linecorp/armeria/client/HttpClientExpect100HeaderTest.java