### Question:
JarWildcardStreamLocator extends DefaultWildcardStreamLocator { File getJarFile(final File folder) { return new File(StringUtils.substringAfter(StringUtils.substringBeforeLast(folder.getPath(), "!"), "file:")); }  @Override InputStream locateStream(final String uri, final File folder);  }### Answer:
@Test public void shouldGetJarFileFromFile() { final String actual = jarStreamLocator.getJarFile(new File("file:path/to/file!one/two/three.class")).getPath(); final String expected = FilenameUtils.separatorsToSystem("path/to/file"); Assert.assertEquals(expected, actual); }