public void testAESEncryptor() throws Exception {
// password to create key - same Encryptor
String queryString = "url=http://localhost:50070/api/v1/blahblah";
AESEncryptor aes0 = new AESEncryptor("password");
EncryptionResult result0 = cs.encryptForCluster("Test", "encrypt_url", queryString.getBytes("UTF8"));
byte[] decrypted0 = aes0.decrypt(result0.salt, result0.iv, result0.cipher);
assertEquals(queryString, new String(decrypted0, "UTF8"));
assertEquals(queryString.getBytes("UTF8").length, decrypted0.length);
assertEquals(queryString.getBytes("UTF8").length, new String(decrypted0, "UTF8").toCharArray().length);
// password to create key - same Encryptor