HashUtils { @NotNull public static String computeMd5Hash(final byte[] bytes) throws NoSuchAlgorithmException { return computeHash(bytes, "MD5"); } private  HashUtils(); @NotNull static String computeSha256Hash(@NotNull final byte[] bytes); @NotNull static String computeMd5Hash(final byte[] bytes);  }
@Test public void testComputeMd5Hash() { try { Assert.assertEquals(EXPECTED_PHOTO_HASH_MD5, HashUtils.computeMd5Hash(PHOTO_BYTES)); Assert.assertEquals(EXPECTED_TEXT_HASH_MD5, HashUtils.computeMd5Hash(TEXT_BYTES)); } catch (NoSuchAlgorithmException e) { Assert.fail("Call to FluxtreamCapturePhotoFacet.testComputeMd5Hash() threw a NoSuchAlgorithmException: " + e); } }