@Test
public void testHashCode() throws FileNotFoundException,
 URISyntaxException, IOException, NoSuchAlgorithmException {

lean dataTested = false;
 (File file : AllCoreTest
etFilesFromResourceDir(AllCoreTest.TEST_DATA_ROOT)) {
 JavaDigestValue apacheValue = JavaDigestValue.getInstance(
  DigestAlgorithm.MD5,
  DigestUtils.md5(new FileInputStream(file)));
 JavaDigestValue testValue = JavaDigestValue.getInstance(
  DigestAlgorithm.MD5, file);
 JavaDigestValue testSha256Value = JavaDigestValue.getInstance(
  DigestAlgorithm.SHA256, file);
 assertEquals(
  "apacheValue.hash() and testValue.hash() should be equal",
  apacheValue.hashCode(), testValue.hashCode());
 assertTrue(
  "apacheValue.hash() and testSha256Value.has() shouldn't be equal",
  apacheValue.hashCode() != testSha256Value.hashCode());
 dataTested = true;
ertTrue("No data tested as flag no set", dataTested);
}