### Question:
HashUtils { public static String sha256(String message) { return hash(message, MessageDigestAlgorithm.SHA256); } private  HashUtils(); static String sha1(String message); static String sha256(String message); static String sha512(String message); static String md5(String message); static MessageDigest getDigest(MessageDigestAlgorithm algorithm); static boolean isValidBcryptHash(String hash); static String hash(String message, MessageDigest algorithm);  }### Answer:
@Test public void shouldHashSha256() { String[] correctHashes = { "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8", "c04265d72b749debd67451c083785aa572742e3222e86884de16485fa14b55e7", "005e3d7439d3e9a60a9d74aa1c763b36bfebec8e434ab6c5efab3df37eb2dae6" }; List<String> result = new ArrayList<>(); for (String password : GIVEN_PASSWORDS) { result.add(HashUtils.sha256(password)); } assertThat(result, contains(correctHashes)); }