### Question:
Md5Crypt { public static String md5Crypt(final byte[] keyBytes) { return md5Crypt(keyBytes, MD5_PREFIX + B64.getRandomSalt(8)); }  static String apr1Crypt(final byte[] keyBytes); static String apr1Crypt(final byte[] keyBytes, String salt); static String apr1Crypt(final String keyBytes); static String apr1Crypt(final String keyBytes, final String salt); static String md5Crypt(final byte[] keyBytes); static String md5Crypt(final byte[] keyBytes, final String salt); static String md5Crypt(final byte[] keyBytes, final String salt, final String prefix);  }### Answer:
@Test public void testMd5CryptExplicitCall() { assertTrue(Md5Crypt.md5Crypt("secret".getBytes()).matches("^\\$1\\$[a-zA-Z0-9./]{0,8}\\$.{1,}$")); assertTrue(Md5Crypt.md5Crypt("secret".getBytes(), null).matches("^\\$1\\$[a-zA-Z0-9./]{0,8}\\$.{1,}$")); }
@Test(expected = NullPointerException.class) public void testMd5CryptNullData() { Md5Crypt.md5Crypt((byte[]) null); }
@Test(expected = IllegalArgumentException.class) public void testMd5CryptWithEmptySalt() { Md5Crypt.md5Crypt("secret".getBytes(), ""); }