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