public void testIterationWithPreservePayload() throws Exception {
Mediator iterate = fac.createMediator(createOMElement("<iterate " +
"expression=\"//original/itr\" preservePayload=\"true\" attachPath=\"//original\" " +
"xmlns=\"http://ws.apache.org/ns/synapse\"><target soapAction=\"urn:iterate\" " +
"sequence=\"seqRef\"/></iterate>"));
iterate.mediate(testCtx);
while(helperMediator.getMediatedContext(1) == null) {
Thread.sleep(100);
}
MessageContext mediatedCtx = helperMediator.getMediatedContext(0);
assertEquals(mediatedCtx.getSoapAction(), "urn:iterate");