public void testEmptyAuthority() throws Exception {
  URL url=new URL("http:///foo");
  assertEquals("",url.getAuthority());
  assertEquals("/foo",url.getPath());
  assertEquals("http:///foo",url.toString());
}

public void testEmptyAuthority ( ) throws Exception { URL url = new URL ( "http:///foo" ) ; assertEquals ( "" , url . getAuthority ( ) ) ; assertEquals ( "/foo" , url . getPath ( ) ) ; assertEquals ( "http:///foo" , url . toString ( ) ) ; }
the ri is not self - consistent on missing authorities , returning either null or the empty string depending on the number of slashes in the path . we always treat ' / / ' as the beginning of an authority .
