@Test
    public void testEquality() {
        URI one = new URI("http://www.nils.arne.com");
        URI two = new URI("http://www.nils.arne.com");

        assertEquals(one, two);
        assertEquals(one.hashCode(), two.hashCode());
        assertEquals("http://www.nils.arne.com/", one.toString());

        assertEqualURIs(
                "http://info.t.fast.no/art.php?sid=29&mode=thread&order=0",
                "http://info.t.fast.no/art.php?sid=29&mode=thread&order=0");
        assertEqualURIs("http://a/g/", "http://a/g/");
        assertEquals("http://a/g;x?y#s",
                new URI("http://a/g;x?y#s", true).stringValue());
        assertEquals("http://a/g?y#s",
                new URI("http://a/g?y#s", true).stringValue());
        assertEqualURIs("http://a/b/c/.g", "http://a/b/c/.g");
        assertEqualURIs("http://a/b/c/..g", "http://a/b/c/..g");
        assertEqualURIs("http://a/b/c/g;x=1/y", "http://a/b/c/g;x=1/y");
        assertEquals("http://a/b/c/g#s/../x",
                new URI("http://a/b/c/g#s/../x", true).stringValue());
        assertEquals("http://www.strange_host.com/b",
                new URI("http://www.strange_host.com/b", true).stringValue());
    }
Tests the URI class

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