@Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); initXpath(); doc = XmlUtils.parseXml(TestUtils.SAMPLE_SOAP_MESSAGE); secHeader = new WSSecHeader(); secHeader.insertSecurityHeader(doc); manualSAMLentry = new ManualSAMLEntry(); manualSAMLentry.init(wssEntryConfigMock, outgoingWssMock); when(wssEntryConfigMock.getConfiguration()).thenReturn(xmlObjectMock); when(contextMock.expand(TestUtils.SAMPLE_SAML_1_ASSERTION)) .thenReturn(TestUtils.SAMPLE_SAML_1_ASSERTION); }
public void updateProperty(boolean prettyPrint) { if (context != null && propertyRef != null) { context.setProperty(propertyRef, prettyPrint ? getPrettyXml() : getXml()); } }
public XmlHolder(PropertyExpansionContext context, String propertyRef) throws XmlException { this(context.getProperty(propertyRef).toString()); this.context = context; this.propertyRef = propertyRef; }