}
@Test
public void testConfigComponent() throws Exception
{
ProcessComponent c;
if (variant.equals(ConfigVariant.FLOW))
{
c = (ProcessComponent) ((Flow) muleContext.getRegistry().lookupObject("Service2")).getMessageProcessors()
.get(0);
}
else
{
c = (ProcessComponent) muleContext.getRegistry().lookupService("Service2").getComponent();
}
assertNotNull(c);
assertEquals("test.def", c.getResource());
assertEquals("myId", c.getProcessIdField());
// BPMS gets set implicitly via MuleRegistry.lookupObject(BPMS.class)
BPMS bpms = c.getBpms();
assertNotNull(bpms);
assertEquals(TestBpms.class, bpms.getClass());
assertEquals("bar", ((TestBpms) bpms).getFoo());
}