### Question:
URIParserUtil { public static String normalize(final String uri) { URL url = null; String result = null; try { url = new URL(uri); result = escapeChars(url.toURI().normalize().toString().replace('\\', '/')); } catch (MalformedURLException e1) { try { if (uri.startsWith("classpath:")) { url = ClassLoaderUtils.getResource(uri.substring(10), URIParserUtil.class); return url != null ? url.toExternalForm() : uri; } File file = new File(uri); if (file.exists()) { return file.toURI().normalize().toString(); } final String f; if (uri.indexOf(':') != -1 && !uri.startsWith("/")) { f = "file:/" + uri; } else { f = "file:" + uri; } url = new URL(f); return escapeChars(url.toString().replace("\\", "/")); } catch (Exception e2) { return escapeChars(uri.replace("\\", "/")); } } catch (URISyntaxException e) { result = escapeChars(url.toString().replace("\\", "/")); } return result; } 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 testNormalize() throws Exception { String uri = "wsdl/hello_world.wsdl"; assertEquals("file:wsdl/hello_world.wsdl", URIParserUtil.normalize(uri)); uri = "\\src\\wsdl/hello_world.wsdl"; assertEquals("file:/src/wsdl/hello_world.wsdl", URIParserUtil.normalize(uri)); uri = "wsdl\\hello_world.wsdl"; assertEquals("file:wsdl/hello_world.wsdl", URIParserUtil.normalize(uri)); uri = "http: assertEquals("http: uri = "file: assertEquals("file:/c:/hello.wsdl", URIParserUtil.normalize(uri)); uri = "c:\\hello.wsdl"; assertEquals("file:/c:/hello.wsdl", URIParserUtil.normalize(uri)); uri = "/c:\\hello.wsdl"; assertEquals("file:/c:/hello.wsdl", URIParserUtil.normalize(uri)); uri = "file:/home/john/test/all/../../alltest"; assertEquals("file:/home/john/alltest", URIParserUtil.normalize(uri)); }