HttpUrl { public String username() { return username; } private  HttpUrl(Builder builder); URL url(); URI uri(); String scheme(); boolean isHttps(); String encodedUsername(); String username(); String encodedPassword(); String password(); String host(); int port(); static int defaultPort(String scheme); int pathSize(); String encodedPath(); List<String> encodedPathSegments(); List<String> pathSegments(); String encodedQuery(); String query(); int querySize(); String queryParameter(String name); Set<String> queryParameterNames(); List<String> queryParameterValues(String name); String queryParameterName(int index); String queryParameterValue(int index); String encodedFragment(); String fragment(); HttpUrl resolve(String link); Builder newBuilder(); Builder newBuilder(String link); static HttpUrl parse(String url); static HttpUrl get(URL url); static HttpUrl get(URI uri); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void username() throws Exception { assertEquals(HttpUrl.parse("http: assertEquals(HttpUrl.parse("http: }