JarUtils { public static void unzipToFile(Path outsideDirectory, String... fileOnClassPath) { unzipResource(outsideDirectory, findResources(fileOnClassPath).get(0)); }  static void unzipToFile(Path outsideDirectory, String... fileOnClassPath); static void unzipResource(Path outsideDirectory, ResourceInfo resource); static String fileNameFromClasspath(String classPathFile); static void unzipDirectory(Path outsideDirectory, String... dirOnClassPath); static FluentIterable<ResourceInfo> findResources(final String... filterParts); static void reload();  }
@Test public void should_unzipFile() throws IOException { JarUtils.unzipToFile(Paths.get("target"), "LICENSE"); FileUtils.forceDelete((File) FileUtils.listFiles(Paths.get("target").toFile(), new IOFileFilter() { @Override public boolean accept(File dir, String name) { return name.contains("LICENSE"); } @Override public boolean accept(File file) { return file.getName().contains("LICENSE"); } }, FalseFileFilter.FALSE).iterator().next()); }