### Question:
URIParserUtil { public static String getAbsoluteURI(final String arg) { if (arg == null) { return null; } try { URI uri = new URI(arg); if ("file".equalsIgnoreCase(uri.getScheme())) { if (!uri.isOpaque()) { return uri.normalize().toString(); } return new File("").toURI().resolve(uri.getPath()).toString(); } return normalize(arg); } catch (Exception e2) { return normalize(arg); } } private  URIParserUtil(); static URL[] pathToURLs(String path); static String escapeChars(String s); static String normalize(final String uri); static String getAbsoluteURI(final String arg); static String relativize(String base, String toBeRelativized); static String relativize(URI baseURI, URI toBeRelativizedURI);  }### Answer:
@Test public void testGetAbsoluteURI() throws Exception { String uri = "wsdl/hello_world.wsdl"; String uri2 = URIParserUtil.getAbsoluteURI(uri); assertNotNull(uri2); assertTrue(uri2.startsWith("file")); assertTrue(uri2.contains(uri)); assertTrue(uri2.contains(new java.io.File("").toString())); uri = getClass().getResource("/schemas/echoSchema.xsd").toString(); uri2 = URIParserUtil.getAbsoluteURI(uri); assertNotNull(uri2); assertTrue(uri2.startsWith("file")); assertTrue(uri2.contains(uri)); assertTrue(uri2.contains(new java.io.File("").toString())); uri = "c:\\wsdl\\hello_world.wsdl"; uri2 = URIParserUtil.getAbsoluteURI(uri); assertNotNull(uri2); assertEquals("file:/c:/wsdl/hello_world.wsdl", uri2); uri = "/c:\\wsdl\\hello_world.wsdl"; uri2 = URIParserUtil.getAbsoluteURI(uri); assertNotNull(uri2); assertEquals("file:/c:/wsdl/hello_world.wsdl", uri2); uri = "http: assertEquals(uri, URIParserUtil.getAbsoluteURI(uri)); uri = "file:/home/john/test/all/../../alltest"; assertEquals("file:/home/john/alltest", URIParserUtil.getAbsoluteURI(uri)); }