### Question:
PathUtil { public static void unzip(Path zip, Path target) throws IOException { try (final ZipFile zipFile = new ZipFile(zip.toFile())){ unzip(zipFile, target); } }  static void copyRecursively(final Path source, final Path target, boolean overwrite); static void deleteSilentlyRecursively(final Path path); static void deleteRecursively(final Path path); static final Path resolveSecurely(Path rootPath, String path); static final boolean isArchive(Path path); static final boolean isArchive(InputStream in); static List<ContentRepositoryElement> listFiles(final Path rootPath, Path tempDir, final ContentFilter filter); static Path createTempDirectory(Path dir, String prefix); static void unzip(Path zip, Path target); static String getFileExtension(Path path); static Path readFile(Path src, Path tempDir);  }### Answer:
@Test public void testUnzip() throws Exception { Path archive = root.resolve("test.zip"); Path target = root.resolve("target"); try (ZipOutputStream out = new ZipOutputStream(Files.newOutputStream(archive))) { ZipEntry entry = new ZipEntry("overlay.xhtml"); out.putNextEntry(entry); try (InputStream in = this.getClass().getClassLoader().getResourceAsStream("overlay.xhtml")) { StreamUtils.copyStream(in, out); } out.closeEntry(); } PathUtil.unzip(archive, target); Assert.assertTrue(Files.exists(target)); Path explodedFile = target.resolve("overlay.xhtml"); Assert.assertTrue(Files.exists(explodedFile)); Assert.assertTrue(Files.isRegularFile(explodedFile)); }