@Test
    public void testValid() {
        assertTrue(
                new URI("http://www.one.com/isValid?even=if&theres=args").isValid());
        assertTrue(
                !new URI("http://www.one.com/isValid?even=if&theres=args").isOpaque());

        assertTrue(!(new URI("not\\uri?", false, true).isValid()));

        assertTrue(new URI("http://www.strange_host.com/b").isValid());
        assertTrue(!new URI("http://www.strange_host.com/b").isOpaque());
    }
Tests the URI class

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