### Question:
FileManager { public void deleteRecursively(File file) throws ApplicationException { deleteRecursively(file, null, FileManager.DeletionPolicy.DELETE_IMMEDIATELY); } FileManager();  FileManager(Application app); void synchronize(File source, File target); void rename(File fileToRename, File target); void move(File object, File newParent); void move(File object, File newParent, FileFilter filter); void delete(File object); void delete(File object, FileFilter filter); void deleteChildren(File parentDir); void deleteRecursively(File file); void deleteRecursively(File file, FileFilter filter,
                                DeletionPolicy deletePolicy); File copy(File objectFile, File destDir); File copy(File objectFile, File destDir, boolean overwrite); void copyRecursively(File objectFile, File destDir); void copyRecursively(File objectFile, File destDir, FileFilter filter); void copyRecursively(File objectFile, File destDir,
                              FileFilter filter, boolean overwrite); boolean filesDiffer(File f1, File f2);  }### Answer:
@Test(enabled = false) public void testDeleteRecursively1() throws Exception { File dir = new File(fmWorkspace, "dir"); createSourceFiles(dir, "abc"); File d2 = new File(dir, "d2"); File d2b = new File(d2, "d2b"); final File f2b1 = new File(d2b, "f2b1"); FileFilter rejectOpFilter = new FileFilter() { @Override public boolean accept(File pathname) { return false; } }; int childCount = countSelfAndAllChildren(dir); assertTrue(dir.exists()); fileManager.deleteRecursively(dir, rejectOpFilter, FileManager.DeletionPolicy.DELETE_IMMEDIATELY); assertTrue(dir.exists()); assertEquals(childCount, countSelfAndAllChildren(dir)); FileFilter killChildFileFilter = new FileFilter() { @Override public boolean accept(File f) { return f.equals(f2b1); } }; assertTrue(dir.exists()); assertTrue(f2b1.exists()); fileManager.deleteRecursively(dir, killChildFileFilter, FileManager.DeletionPolicy.DELETE_IMMEDIATELY); assertTrue(dir.exists()); assertEquals(childCount - 1, countSelfAndAllChildren(dir)); assertFalse(f2b1.exists()); }
@Test(enabled = false) public void testDeleteRecursively() throws Exception { File dir = new File(fmWorkspace, "dir"); createSourceFiles(dir, "abc"); assertTrue(dir.exists()); fileManager.deleteRecursively(dir); assertFalse(dir.exists()); }