### Question:
PathUtil { public static Path createTempDirectory(Path dir, String prefix) throws IOException { try { return Files.createTempDirectory(dir, prefix); } catch (UnsupportedOperationException ex) { } return Files.createTempDirectory(dir, prefix); }  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 testCreateTempDirectory() throws Exception { Path result = PathUtil.createTempDirectory(root, "test"); Assert.assertTrue(Files.exists(result)); Assert.assertTrue(Files.isDirectory(result)); Assert.assertTrue(result.getFileName().toString().startsWith("test")); }