@Test
    public void testURLDetteErEn() {
        URI uri = new URI("https://dette.er.en:2020/~janie/index.htm?param1=q&param2=r", true);
        assertTrue(uri.isValid());
        assertEquals("https", uri.getScheme());
        assertEquals("dette.er.en", uri.getHost());
        assertEquals("er.en", uri.getDomain());
        assertEquals("en", uri.getMainTld());
        assertEquals(2020, uri.getPort());
        assertEquals("/~janie/index.htm", uri.getPath());
        assertEquals("index.htm", uri.getFilename());
        assertEquals("htm", uri.getExtension());
        assertNull(uri.getParams());
        assertEquals("param1=q&param2=r", uri.getQuery());
        assertNull(uri.getFragment());
    }
Tests the URI class

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