public int getServerPort() {
        int port = getUri().getPort();
        if(port == -1) {
            if(isSecure()) {
                port = DEFAULT_HTTPS_PORT;
            }
            else {
                port = DEFAULT_HTTP_PORT;
            }
        }

        return port;
    }
@Test
    void testGetServerPort() {
        {
            URI uri = URI.create("http://example.yahoo.com/test");
            HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
            DiscFilterRequest request = new DiscFilterRequest(httpReq);
            assertEquals(request.getServerPort(), 80);

        }
        {
            URI uri = URI.create("https://example.yahoo.com/test");
            HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
            DiscFilterRequest request = new DiscFilterRequest(httpReq);
            assertEquals(request.getServerPort(), 443);
        }
    }