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