RetrievalWorker implements Runnable { protected boolean checksumsMatch(File localFile) throws IOException { return checksumsMatch(localFile, null); } RetrievalWorker(ContentItem contentItem,
                           RetrievalSource source,
                           File contentDir,
                           boolean overwrite,
                           OutputWriter outWriter,
                           boolean createSpaceDir,
                           boolean applyTimestamps); void run(); Map<String, String> retrieveFile(); Map<String, String> retrieveFile(RetrievalListener listener); File getLocalFile();  }
@Test public void testChecksumsMatch() throws Exception { RetrievalWorker worker = createRetrievalWorker(true); File localFile = new File(tempDir, "checksum-test"); FileUtils.writeStringToFile(localFile, contentValue); assertTrue(worker.checksumsMatch(localFile)); FileUtils.writeStringToFile(localFile, "invalid-value"); assertFalse(worker.checksumsMatch(localFile)); }