protected void testEncryption(String fragment, CamelContext context) throws Exception {
MockEndpoint resultEndpoint = context.getEndpoint("mock:encrypted", MockEndpoint.class);
resultEndpoint.setExpectedMessageCount(1);
context.start();
sendText(fragment, context);
resultEndpoint.assertIsSatisfied(100);
Exchange exchange = resultEndpoint.getExchanges().get(0);
Document inDoc = getDocumentForInMessage(exchange);
if (log.isDebugEnabled()) {
logMessage(exchange, inDoc);
}