private static void getAllRemovedInRemovedSubDir(String basePath, DirIndex dirIndex, Set<String> allRemoved) {
    String prefix = basePath.isEmpty() ? basePath : basePath + "/";
    for (FileIndex f: dirIndex.getFilesPresent()) {
      allRemoved.add(prefix + f.getFileName());
    }

    for (DirIndex d: dirIndex.getSubDirsPresent()) {
      getAllRemovedInRemovedSubDir(prefix + d.getDirName(), d, allRemoved);
    }
  }
Test util methods to work with local dirs, {@link DirDiff}s and {@link DirIndex}es.
samza-core/src/test/java/org/apache/samza/storage/blobstore/util/BlobStoreTestUtil.java