List<XMLSecurityConstants.ContentType> protectionOrder = new LinkedList<XMLSecurityConstants.ContentType>();
protectionOrder.add(XMLSecurityConstants.ContentType.ENCRYPTION);
EncryptedPartSecurityEvent encryptedPartSecurityEvent = new EncryptedPartSecurityEvent(null, true, protectionOrder);
encryptedPartSecurityEvent.setElementPath(WSSConstants.SOAP_11_BODY_PATH);
policyEnforcer.registerSecurityEvent(encryptedPartSecurityEvent);
policyEnforcer.doFinal();
}
@Test
public void testPolicyEncryptBeforeSignNegative() throws Exception {
String policyString =