JavaDigestValue implements DigestValue, Serializable { @Override public URI getAlgorithmId() { return this.algorithm.getId(); } JavaDigestValue();   JavaDigestValue(DigestAlgorithm algorithm, String hexDigest);   JavaDigestValue(DigestAlgorithm algorithm, byte[] digest); @Override URI getAlgorithmId(); @Override String getHexDigest(); @Override byte[] getDigest(); String toXml(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); static JavaDigestValue getInstance(String xml); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			byte[] digest); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			String hexDigest); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			InputStream byteStream); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			File file); static Set<JavaDigestValue> createDigestSet(
			Set<DigestAlgorithm> algorithms, InputStream is);  }
@Test public void testGetAlgorithmId() throws FileNotFoundException, URISyntaxException, IOException, NoSuchAlgorithmException { boolean dataTested = false; for (File file : AllCoreTest .getFilesFromResourceDir(AllCoreTest.TEST_DATA_ROOT)) { JavaDigestValue apacheValue = JavaDigestValue.getInstance( DigestAlgorithm.SHA1, DigestUtils.sha(new FileInputStream(file))); JavaDigestValue testValue = JavaDigestValue.getInstance( DigestAlgorithm.SHA1, file); JavaDigestValue testSha256Value = JavaDigestValue.getInstance( DigestAlgorithm.SHA256, file); assertEquals("apacheValue.id() and testValue.id() should be equal", apacheValue.getAlgorithmId(), testValue.getAlgorithmId()); assertFalse( "apacheValue.id() and testSha256Value.id() shouldn't be equal", apacheValue.getAlgorithmId().equals( testSha256Value.getAlgorithmId())); dataTested = true; } assertTrue("No data tested as flag no set", dataTested); }