@Test
    public void testURLFooNo() {
        URI uri = new URI(
                "http://www.foo.no:8080/path/filename.ext;par1=hello/par2=world?query=test#fragment", true);
        assertTrue(uri.isValid());
        assertEquals("http", uri.getScheme());
        assertEquals("www.foo.no", uri.getHost());
        assertEquals("foo.no", uri.getDomain());
        assertEquals("no", uri.getMainTld());
        assertEquals(8080, uri.getPort());
        assertEquals("/path/filename.ext;par1=hello/par2=world", uri.getPath());
        assertEquals("filename.ext", uri.getFilename());
        assertEquals("ext", uri.getExtension());
        assertEquals("par1=hello/par2=world", uri.getParams());
        assertEquals("query=test", uri.getQuery());
        assertEquals("fragment", uri.getFragment());
    }
Tests the URI class

@author bratseth
vespajlib/src/test/java/com/yahoo/net/URITestCase.java