WebAddress webAddress = new WebAddress("http://google.com./b/c/g"); assertEquals("google.com.", webAddress.getHost()); assertEquals("/b/c/g", webAddress.getPath());
WebAddress webAddress = new WebAddress("http://www.myspace.com?si=1"); assertEquals("www.myspace.com", webAddress.getHost()); assertEquals("/?si=1", webAddress.getPath());