private static final String VM_SCHEMA_URL = "http://www.mulesoft.org/schema/mule/vm";
@Test
public void createsMessageSourceArtifact() throws MuleArtifactFactoryException, DocumentException
{
SpringXmlConfigurationMuleArtifactFactory factory = new SpringXmlConfigurationMuleArtifactFactory();
XmlConfigurationCallback callback = mock(XmlConfigurationCallback.class);
HashMap<String, String> map = new HashMap<String, String>();
map.put("test", "test1");
when(callback.getEnvironmentProperties()).thenReturn(map);
when(callback.getPropertyPlaceholders()).thenReturn(new Element[] {});
when(callback.getSchemaLocation(VM_SCHEMA_URL)).thenReturn("http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd");
Element element = createElement("inbound-endpoint", VM_SCHEMA_URL, "vm");
element.setAttribute("path", "/test");
MuleArtifact artifact = factory.getArtifactForMessageProcessor(element, callback);
Assert.assertFalse(artifact.hasCapability(Testable.class));
}