Map<String, String> validateMessageElements = new HashMap<String, String>();
validateMessageElements.put("//root/element/sub-elementA", "citrus:concat('text', '-', 'value')");
validateMessageElements.put("//sub-elementB", "citrus:concat(${text}, '-', 'value')");
PayloadTemplateMessageBuilder controlMessageBuilder = new PayloadTemplateMessageBuilder();
XmlMessageValidationContext validationContext = new XmlMessageValidationContext();
validationContext.setMessageBuilder(controlMessageBuilder);
validationContext.setPathValidationExpressions(validateMessageElements);
List<ValidationContext> validationContexts = new ArrayList<ValidationContext>();