new ContentEncryptedElementSecurityEvent(
(InboundSecurityToken)recipientTokenSecurityEvent.getSecurityToken(), true, protectionOrder);
contentEncryptedElementSecurityEvent.setElementPath(WSSConstants.SOAP_11_BODY_PATH);
policyEnforcer.registerSecurityEvent(contentEncryptedElementSecurityEvent);
OperationSecurityEvent operationSecurityEvent = new OperationSecurityEvent();
operationSecurityEvent.setOperation(new QName("definitions"));
try {
policyEnforcer.registerSecurityEvent(operationSecurityEvent);
Assert.fail("Exception expected");
} catch (WSSecurityException e) {
Assert.assertTrue(e.getCause() instanceof PolicyViolationException);