@Test
    public void addressesAndPorts_localhost() throws Exception {
        final RequestHeaders headers = RequestHeaders.of(HttpMethod.GET, "/jsp/addrs_and_ports.jsp", "Host",
                                                         "localhost:1111");
        final AggregatedHttpResponse response = WebClient.of(server().httpUri()).blocking().execute(headers);
        assertThat(response.status()).isSameAs(HttpStatus.OK);
        assertThat(String.valueOf(response.contentType())).startsWith("text/html");
        final String actualContent = CR_OR_LF.matcher(response.contentUtf8())
                                             .replaceAll("");
        assertThat(actualContent).matches(
                "<html><body>" +
                "<p>RemoteAddr: 127\\.0\\.0\\.1</p>" +
                "<p>RemoteHost: 127\\.0\\.0\\.1</p>" +
                "<p>RemotePort: [1-9][0-9]+</p>" +
                "<p>LocalAddr: (?!null)[^<]+</p>" +
                "<p>LocalName: " + server().server().defaultHostname() + "</p>" +
                "<p>LocalPort: " + server().httpPort() + "</p>" +
                "<p>ServerName: localhost</p>" +
                "<p>ServerPort: 1111</p>" +
                "</body></html>");
    }
Returns the {@link ServerExtension} that provides the {@link Server} that serves the {@link Service}s
this test runs against.
testing-internal/src/main/java/com/linecorp/armeria/internal/testing/webapp/WebAppContainerTest.java