void () { String p1 = UrlClassLoader.urlToFilePath("file:C:\\Program%20Files\\JetBrains\\IntelliJ%20IDEA%20211.2638\\lib\\resources.jar!/"); String p2 = UrlClassLoader.urlToFilePath("file:C:\\Program%20Files\\JetBrains\\IntelliJ%20IDEA%20211.2638\\lib\\resources.jar"); String p3 = UrlClassLoader.urlToFilePath("C:\\Program%20Files\\JetBrains\\IntelliJ%20IDEA%20211.2638\\lib\\resources.jar"); assertThat(p1).isEqualTo(p2); assertThat(p1).isEqualTo(p3); assertThat(p1).isEqualTo("C:\\Program Files\\JetBrains\\IntelliJ IDEA 211.2638\\lib\\resources.jar"); assertThat(UrlClassLoader.urlToFilePath( "file:/C:\\Program%20Files\\JetBrains\\resources.jar!/")).isEqualTo("C:\\Program Files\\JetBrains\\resources.jar"); assertThat(UrlClassLoader.urlToFilePath("file:/Users/foo/r.jar")).isEqualTo("/Users/foo/r.jar"); assertThat(UrlClassLoader.urlToFilePath("file:/Users/path with space/r.jar")).isEqualTo("/Users/path with space/r.jar"); assertThat(UrlClassLoader.urlToFilePath("/Users/path with space/r.jar")).isEqualTo("/Users/path with space/r.jar"); }