### Question:
PathOperations { @Nonnull public static FileIOError createDirRecursive (@Nonnull final Path aDir) { ValueEnforcer.notNull (aDir, "Directory"); final Path aRealDir = _getUnifiedPath (aDir); return FileOperations.createDirRecursive (aRealDir.toFile ()); } private  PathOperations(); static boolean isExceptionOnDeleteRoot(); static void setExceptionOnDeleteRoot(final boolean bExceptionOnDeleteRoot); @Nonnull static FileIOError createDir(@Nonnull final Path aDir); @Nonnull static FileIOError createDirIfNotExisting(@Nonnull final Path aDir); @Nonnull static FileIOError createDirRecursive(@Nonnull final Path aDir); @Nonnull static FileIOError createDirRecursiveIfNotExisting(@Nonnull final Path aDir); @Nonnull static FileIOError deleteDir(@Nonnull final Path aDir); @Nonnull static FileIOError deleteDirIfExisting(@Nonnull final Path aDir); @Nonnull static FileIOError deleteDirRecursive(@Nonnull final Path aDir); @Nonnull static FileIOError deleteDirRecursiveIfExisting(@Nonnull final Path aDir); @Nonnull static FileIOError deleteFile(@Nonnull final Path aFile); @Nonnull static FileIOError deleteFileIfExisting(@Nonnull final Path aFile); @Nonnull static FileIOError renameFile(@Nonnull final Path aSourceFile, @Nonnull final Path aTargetFile); @Nonnull static FileIOError renameDir(@Nonnull final Path aSourceDir, @Nonnull final Path aTargetDir); @Nonnull static FileIOError copyFile(@Nonnull final Path aSourceFile, @Nonnull final Path aTargetFile); @Nonnull static FileIOError copyDirRecursive(@Nonnull final Path aSourceDir, @Nonnull final Path aTargetDir); static final boolean DEFAULT_EXCEPTION_ON_DELETE_ROOT; }### Answer:
@Test public void testCreateDirRecursive () { final Path aDir1 = Paths.get ("TestDir"); final Path aDir11 = aDir1.resolve ("TestSubDir"); assertFalse (Files.isDirectory (aDir1)); assertFalse (Files.isDirectory (aDir11)); _expectedSuccess (PathOperations.createDirRecursive (aDir11)); try { assertTrue (Files.isDirectory (aDir1)); assertTrue (Files.isDirectory (aDir11)); _expectedError (PathOperations.createDirRecursive (aDir1), EFileIOErrorCode.TARGET_ALREADY_EXISTS); _expectedError (PathOperations.createDirRecursive (aDir11), EFileIOErrorCode.TARGET_ALREADY_EXISTS); } finally { _expectedSuccess (PathOperations.deleteDirRecursive (aDir1)); assertFalse (Files.isDirectory (aDir11)); assertFalse (Files.isDirectory (aDir1)); _expectedError (PathOperations.deleteDirRecursive (aDir1), EFileIOErrorCode.SOURCE_DOES_NOT_EXIST); } try { PathOperations.createDirRecursive (Paths.get ("\0")); fail (); } catch (final InvalidPathException ex) {} try { PathOperations.createDirRecursive (null); fail (); } catch (final NullPointerException ex) {} }