Patch { public Map<String, Long> digestFiles(File dir, List<String> ignoredFiles, boolean normalize, UpdaterUI ui) throws IOException, OperationCancelledException { Map<String, Long> result = new LinkedHashMap<String, Long>(); LinkedHashSet<String> paths = Utils.collectRelativePaths(dir, myIsStrict); for (String each : paths) { if (ignoredFiles.contains(each)) continue; ui.setStatus(each); ui.checkCancelled(); result.put(each, digestFile(new File(dir, each), normalize)); } return result; } Patch(PatchSpec spec, UpdaterUI ui);  Patch(InputStream patchIn); List<PatchAction> getActions(); void write(OutputStream out); List<ValidationResult> validate(final File rootDir, UpdaterUI ui); ApplicationResult apply(final ZipFile patchFile,
                                 final File rootDir,
                                 final File backupDir,
                                 final Map<String, ValidationResult.Option> options,
                                 UpdaterUI ui); void revert(List<PatchAction> actions, final File backupDir, final File rootDir, UpdaterUI ui); long digestFile(File toFile, boolean normalize); Map<String, Long> digestFiles(File dir, List<String> ignoredFiles, boolean normalize, UpdaterUI ui); String getOldBuild(); String getNewBuild(); boolean isStrict(); boolean isNormalized(); boolean validateDeletion(String path);  }
@Test public void testDigestFiles() throws Exception { Map<String, Long> checkSums = myPatch.digestFiles(getDataDir(), Collections.<String>emptyList(), false, TEST_UI); assertEquals(9, checkSums.size()); }