### Question:
Crypt { public static String crypt(final byte[] keyBytes) { return crypt(keyBytes, null); }  static String crypt(final byte[] keyBytes); static String crypt(final byte[] keyBytes, final String salt); static String crypt(final String key); static String crypt(final String key, final String salt);  }### Answer:
@Test public void testCrypt() { assertNotNull(new Crypt()); }
@Test public void testDefaultCryptVariant() { assertTrue(Crypt.crypt("secret").startsWith("$6$")); assertTrue(Crypt.crypt("secret", null).startsWith("$6$")); }
@Test public void testCryptWithBytes() { final byte[] keyBytes = new byte[] { 'b', 'y', 't', 'e' }; final String hash = Crypt.crypt(keyBytes); assertEquals(hash, Crypt.crypt("byte", hash)); }
@Test(expected = IllegalArgumentException.class) public void testCryptWithEmptySalt() { Crypt.crypt("secret", ""); }