### Question:
MessageDigests { public static MessageDigest md5() { return get(MD5_DIGEST); }  static MessageDigest md5(); static MessageDigest sha1(); static MessageDigest sha256(); static String toHexString(byte[] bytes);  }### Answer:
@Test public void md5() { assertHash("d41d8cd98f00b204e9800998ecf8427e", "", MessageDigests.md5()); assertHash("900150983cd24fb0d6963f7d28e17f72", "abc", MessageDigests.md5()); assertHash("8215ef0796a20bcaaae116d3876c664a", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", MessageDigests.md5()); assertHash("7707d6ae4e027c70eea2a935c2296f21", new String(new char[1000000]).replace("\0", "a"), MessageDigests.md5()); assertHash("9e107d9d372bb6826bd81d3542a419d6", "The quick brown fox jumps over the lazy dog", MessageDigests.md5()); assertHash("1055d3e698d289f2af8663725127bd4b", "The quick brown fox jumps over the lazy cog", MessageDigests.md5()); }