### Question:
PathOperations { @Nonnull public static FileIOError createDir (@Nonnull final Path aDir) { ValueEnforcer.notNull (aDir, "Directory"); final Path aRealDir = _getUnifiedPath (aDir); return FileOperations.createDir (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 testCreateDir () { final Path aDir1 = Paths.get ("TestDir"); assertFalse (Files.isDirectory (aDir1)); _expectedSuccess (PathOperations.createDir (aDir1)); try { assertTrue (Files.isDirectory (aDir1)); _expectedError (PathOperations.createDir (aDir1), EFileIOErrorCode.TARGET_ALREADY_EXISTS); } finally { _expectedSuccess (PathOperations.deleteDir (aDir1)); assertFalse (Files.isDirectory (aDir1)); } try { PathOperations.createDir (null); fail (); } catch (final NullPointerException ex) {} }