@Test
    public void testNormalizing() {
        // Abbreviation resolving heuristics
        assertEquals("http://www.a.b/c",
                new URI("www.a.b/c", false, true).toString());
        assertEquals("file://x:\\a", new URI("x:\\a", false, true).toString());
        assertEquals("file://c:/a", new URI("c:/a", false, true).toString());

        // RFC 2396 normalizing
        assertEqualURIs("http://a/c/d", "http://a/b/../c/d");
        assertEqualURIs("http://a/b", "http://a/./b");

        // FAST normalizing
        assertEqualURIs("http://a/", "  http://a  ");
        assertEqualURIs("http://a/%e6;m%e5;ha%f8;l", "http://a/\u00E6m\u00E5ha\u00F8l");
        assertEqualURIs("http://a/&b", "http://a/&amp;b");
        assertEqualURIs("http://a/", "http://A");
        assertEqualURIs("http://a/", "http://a:80");
        assertEqualURIs("https://a/", "https://a:443");
        assertEqualURIs("http://a/", "http://a.");
        assertEqualURIs("http://a/b", "http://a//b");
        assertEqualURIs("http://a/b/", "http://A/b/");
        assertEqualURIs("http://a/b/", "http://a./b/");
        assertEqualURIs("http://a/", "http://a/b/../");
        assertEqualURIs("http://a/../", "http://a/b/../a/../../");
        assertEqualURIs("http://a/", "http://a/b/../");
        assertEqualURIs("http://a/b/c/d", "http://a/b/c/d");
        assertEqualURIs("http://a/b/c", "http://a/b/c#kanoo");

        // Everything combined
        assertEquals("http://www.a.b/m%e5;l/&/%f8;l&&/",
                new URI("   WWW.a.B:80//m\u00E5l/.//&amp;/./\u00F8l&amp;&amp;/foo/../upp/./..", true, true).toString());
    }
Tests the URI class

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