entry.setContentAsXhtml("This <b>is</b> <i>markup</i>");
entry.addAuthor("James");
entry.addLink("http://www.example.org");
// Prepare the encryption options
Encryption enc = absec.getEncryption();
EncryptionOptions options = enc.getDefaultEncryptionOptions();
options.setDataEncryptionKey(key);
// Encrypt the document using the generated key
Document enc_doc = enc.encrypt(entry.getDocument(), options);
assertEquals(
enc_doc.getRoot().getQName(),
new QName(
"http://www.w3.org/2001/04/xmlenc#",
"EncryptedData"));
// Decrypt the document using the generated key
Document<Entry> entry_doc = enc.decrypt(enc_doc, options);
assertTrue(entry_doc.getRoot() instanceof Entry);
assertEquals(
entry_doc.getRoot().getId().toString(),