public void testValidateMediatorInvalidCaseTwoSchemas() throws Exception {
setOnFailInvoked(false);
// create a validate mediator
ValidateMediator validate = new ValidateMediator();
// set the schema url, source xpath and any name spaces
List keys = new ArrayList();
keys.add("xsd-key-1");
keys.add("xsd-key-2");
validate.setSchemaKeys(keys);
AXIOMXPath source = new AXIOMXPath("//m0:Outer");
source.addNamespace("m0", "http://www.apache-synapse.org/test2");
validate.setSource(source);
// set dummy mediator to be called on fail
validate.addChild(testMediator);
Map props = new HashMap();
Property prop = new Property();
prop.setType(Property.DYNAMIC_TYPE);
prop.setKey("file:./../../repository/conf/sample/resources/validate/validate.xsd");
props.put("xsd-key-1", prop);
Property prop2 = new Property();
prop2.setType(Property.DYNAMIC_TYPE);
prop2.setKey("file:./../../repository/conf/sample/resources/validate/validate2.xsd");
props.put("xsd-key-2", prop2);
// test validate mediator, with static enveope
validate.mediate(TestUtils.getTestContext(INVALID_ENVELOPE_TWO_SCHEMAS, props));
assertTrue(onFailInvoked);
}