ValidatesModel validates = new V1ValidatesModel(SwitchYardNamespace.V_1_0.uri());
JavaValidateModel javaValidate = new V1JavaValidateModel(ValidateNamespace.V_1_0.uri());
javaValidate.setName(new QName("msgA"));
javaValidate.setClazz("org.examples.validate.AValidate");
validates.addValidate(javaValidate);
XmlValidateModel xmlValidate = new V1XmlValidateModel(ValidateNamespace.V_1_0.uri());
xmlValidate.setName(new QName("msgB"));
xmlValidate.setSchemaType(XmlSchemaType.XML_SCHEMA);
FileEntryModel entry = new V1FileEntryModel(ValidateNamespace.V_1_0.uri()).setFile("/validates/xxx.xml");
SchemaFilesModel schemaFiles = new V1SchemaFilesModel(ValidateNamespace.V_1_0.uri());
schemaFiles.addEntry(entry);
xmlValidate.setSchemaFiles(schemaFiles);
xmlValidate.setFailOnWarning(true);
validates.addValidate(xmlValidate);
switchyard.setValidates(validates);
String new_xml = switchyard.toString();
String old_xml = new ModelPuller<SwitchYardModel>().pull(XML, getClass()).toString();
XMLUnit.setIgnoreWhitespace(true);