public static URL getCorrectHostnamePort(String hostPort) {
        return validateHostPortString(hostPort);
    }
@Test
    void testCorrectHostnamePortWithHttpsScheme() throws Exception {
        final URL url = new URL("https", "foo.com", 8080, "/some/other/path/index.html");
        assertThat(
                        NetUtils.getCorrectHostnamePort(
                                "https://foo.com:8080/some/other/path/index.html"))
                .isEqualTo(url);
    }