@Test
    public void testURLTestCom() {
        URI uri = new URI("http://test.com/index.htm?p1=q%20test&p2=r%10d", true);
        assertTrue(uri.isValid());
        assertEquals("http", uri.getScheme());
        assertEquals("test.com", uri.getHost());
        assertEquals("test.com", uri.getDomain());
        assertEquals("com", uri.getMainTld());
        assertEquals(-1, uri.getPort());
        assertEquals("/index.htm", uri.getPath());
        assertEquals("index.htm", uri.getFilename());
        assertEquals("htm", uri.getExtension());
        assertNull(uri.getParams());
        assertEquals("p1=q%20test&p2=r%10d", uri.getQuery());
        assertNull(uri.getFragment());
    }
Tests the URI class

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