propMediatorOne.mediate(synCtx);
Object prop = synCtx.getProperty("nameOne");
assertEquals(valueOne, prop);
// Test XML property retreival
String exprValue = new SynapseXPath("synapse:get-property('nameOne')").stringValueOf(synCtx);
assertEquals(xml, exprValue);
// Test property removal
propMediatorOne.setAction(PropertyMediator.ACTION_REMOVE);
propMediatorOne.mediate(synCtx);
assertNull(synCtx.getProperty("nameOne"));
// Setting XML properties using expressions
synCtx.setProperty("nameOne", xml);
PropertyMediator propertyMediatorTwo = new PropertyMediator();
propertyMediatorTwo.setName("nameTwo");
propertyMediatorTwo.setExpression(new SynapseXPath("synapse:get-property('nameOne')"),
XMLConfigConstants.DATA_TYPES.OM.name());
propertyMediatorTwo.mediate(synCtx);
Object exprProp = synCtx.getProperty("nameTwo");
assertTrue(exprProp != null && exprProp instanceof OMElement);
}