FolderHandler { public void createFolderInParentDirectoryPath(String folderName, String parentDirectoryPath) throws IOException { Assert.notNull(parentDirectoryPath); Assert.notNull(folderName); FileUtils.forceMkdir(new File(parentDirectoryPath + File.separator + folderName)); }  void createFolderInParentDirectoryPath(String folderName, String parentDirectoryPath); boolean existFolderNameInParentDirectoryPath(String folderName, String parentDirectoryPath);  }
@Test(expected = IllegalArgumentException.class) public void createFolderInParentDirectoryPathShouldThrowIllegalArgumentExceptionWhenFolderNameIsNull() throws IOException { folderHandler.createFolderInParentDirectoryPath(null, FOLDER_NAME_PARENT); }
@Test(expected = IllegalArgumentException.class) public void createFolderInParentDirectoryPathShouldThrowIllegalArgumentExceptionWhenParentDirectoryPathIsNull() throws IOException { folderHandler.createFolderInParentDirectoryPath(FOLDER_NAME_ACTUAL, null); }
@Test public void createFolderInParentDirectoryPathShouldCreateWhenAllParamIsValid() throws IOException { String actualFolderPath = FOLDER_NAME_PARENT + File.separator + FOLDER_NAME_ACTUAL; File actualFile = new File(actualFolderPath); folderHandler.createFolderInParentDirectoryPath(FOLDER_NAME_ACTUAL, FOLDER_NAME_PARENT); assertThat(actualFile, notNullValue()); assertTrue(actualFile.exists()); assertTrue(actualFile.isDirectory()); }