DeletedDirTracker { boolean shouldDelete(CopyListingFileStatus status) { Path path = status.getPath(); Preconditions.checkArgument(!path.isRoot(), "Root Dir"); if (status.isDirectory()) { boolean deleted = isDirectoryOrAncestorDeleted(path); directories.put(path, path); return !deleted; } else { return !isInDeletedDirectory(path); } } DeletedDirTracker(int cacheSize); @Override String toString();  }
@Test(expected = IllegalArgumentException.class) public void testNoRootDir() throws Throwable { shouldDelete(ROOT, true); }
@Test(expected = IllegalArgumentException.class) public void testNoRootFile() throws Throwable { shouldDelete(dirStatus(ROOT)); }