ClassLoaderUtils { @Deprecated public static File extractPathFromURL(URL url) { URL fileUrl = extractFileUrlFromUrl(url); if ("file".equals(fileUrl.getProtocol())) { return urlToFile(fileUrl); } else { throw new IllegalArgumentException("Unexpected URL: " + url); } } private  ClassLoaderUtils(); @Deprecated static File findClassPathOfClass(Class<?> cl); static URL findUrlClassPathOfClass(Class<?> cl); static URL extractFileUrlFromUrl(URL url); @Deprecated static File extractPathFromURL(URL url); static URL getUrlOfClassPath(); @Deprecated static File getLocationOfClassPath(); static ClassLoader classLoaderFromClassPathUrls(Collection<URL> classPath, ClassLoader parent); @Deprecated static ClassLoader classLoaderFromClassPath(Collection<File> classPath, ClassLoader parent);  }
@Test public void testExtractJarPathFromUrl1() throws Exception { File file = ClassLoaderUtils.extractPathFromURL(new URL("jar:file: verifyPathParts(file, "c", "my!dir", "my-path"); }
@Test public void testExtractJarPathFromUrl2() throws Exception { File file = ClassLoaderUtils.extractPathFromURL(new URL("jar:file: verifyPathParts(file, "c", "mydir!", "my-path"); }
@Test public void testExtractPathFromURLWithSpaces() throws Exception { File file = ClassLoaderUtils.extractPathFromURL(new URL("file: verifyPathParts(file, "c", "my dir", "my-path"); }
@Test public void testExtractPathFromURLWithSpecialChars() throws Exception { File file = ClassLoaderUtils.extractPathFromURL(new URL("file: verifyPathParts(file, "c", "my-path", "\u00e1b\u0678\u040c\u039e\u05de"); }