@Test
    public void testURLSomehostSomedomain() {
        URI uri = new URI("http://somehost.somedomain/this!is!it/boom", true);
        assertTrue(uri.isValid());
        assertEquals("http", uri.getScheme());
        assertEquals("somehost.somedomain", uri.getHost());
        assertEquals("somehost.somedomain", uri.getDomain());
        assertEquals("somedomain", uri.getMainTld());
        assertEquals(-1, uri.getPort());
        assertEquals("/this!is!it/boom", uri.getPath());
        assertEquals("boom", uri.getFilename());
        assertNull(uri.getExtension());
        assertNull(uri.getParams());
        assertNull(uri.getQuery());
        assertNull(uri.getFragment());
    }
Tests the URI class

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