@Test
public void testEncryptElement() {

	// Arrange
	Key aesSymmetricKey = null;
	Key deSedeEncryptKey = null;
	EncryptedKey encryptedKey = null;
	Element rootElement = null;
	try {
		aesSymmetricKey = EncryptTool.generateDataEncryptionKey();
		deSedeEncryptKey = EncryptTool.generateKeyEncryptionKey();
		String algorithmURI = XMLCipher.TRIPLEDES_KeyWrap;
		XMLCipher keyCipher = XMLCipher.getInstance(algorithmURI);
		keyCipher.init(XMLCipher.WRAP_MODE, deSedeEncryptKey);
		encryptedKey = keyCipher.encryptKey(c32Document, aesSymmetricKey);
		rootElement = c32Document.getDocumentElement();
		String notEncrypted = documentXmlConverter
				.convertXmlDocToString(c32Document);
		// Act
		documentEncrypter.encryptElement(c32Document, aesSymmetricKey,
				encryptedKey, rootElement);
		String encrypted = documentXmlConverter
				.convertXmlDocToString(c32Document);
		logger.debug("NOT ENCRYPTED--> " + notEncrypted);
		logger.debug("ENCRYPTED--> " + encrypted);
		// Assert
		assertNotEquals(notEncrypted, encrypted);
		assertTrue(XmlComparator.compareXMLs(testEncrypted, encrypted,
				Arrays.asList("CipherData")).similar());
	} catch (Exception e) {
		logger.error(e.getMessage(), e);
		fail(e.getMessage().toString());
	}
}