@Test
public void testTranslateEncryptionTypes() throws Exception {

  KerberosOperationHandler handler = createHandler();
  Assert.assertEquals(
      new HashSet<EncryptionType>() {{
        add(EncryptionType.AES256_CTS_HMAC_SHA1_96);
        add(EncryptionType.AES128_CTS_HMAC_SHA1_96);
        add(EncryptionType.DES3_CBC_SHA1_KD);
        add(EncryptionType.DES_CBC_MD5);
        add(EncryptionType.DES_CBC_MD4);
        add(EncryptionType.DES_CBC_CRC);
        add(EncryptionType.UNKNOWN);
      }},
      handler.translateEncryptionTypes("aes256-cts-hmac-sha1-96\n aes128-cts-hmac-sha1-96\tdes3-cbc-sha1 arcfour-hmac-md5 " +
          "camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4", "\\s+")
  );
  Assert.assertEquals(
      new HashSet<EncryptionType>() {{
        add(EncryptionType.AES256_CTS_HMAC_SHA1_96);
        add(EncryptionType.AES128_CTS_HMAC_SHA1_96);
      }},
      handler.translateEncryptionTypes("aes", " ")
  );
  Assert.assertEquals(
      new HashSet<EncryptionType>() {{
        add(EncryptionType.AES256_CTS_HMAC_SHA1_96);
      }},
      handler.translateEncryptionTypes("aes-256", " ")
  );
  Assert.assertEquals(
      new HashSet<EncryptionType>() {{
        add(EncryptionType.DES3_CBC_SHA1_KD);
      }},
      handler.translateEncryptionTypes("des3", " ")
  );
}