ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=context,name=\"camel-1\"");
mbeanServer.invoke(on, "addOrUpdateRoutesFromXml", new Object[]{xml}, new String[]{"java.lang.String"});
// there should be 2 routes now
set = mbeanServer.queryNames(new ObjectName("*:type=routes,*"), null);
assertEquals(2, set.size());
// test updated route
getMockEndpoint("mock:changed").expectedMessageCount(1);
template.sendBody("direct:start", "Bye World");