}
@Test
public void testObjectLifecycle() throws Exception
{
TestConnector c = (TestConnector) muleContext.getRegistry().lookupConnector("testConnector");
assertNotNull(c);
assertTrue(c.isInitialised());
TestConnector c2 = (TestConnector) muleContext.getRegistry().lookupConnector("testConnector2");
assertNotNull(c2);
//AbstractMuleTestCase does not start the muleContext, just initialises it
assertTrue(c2.isInitialised());
assertFalse(c.isStarted());
assertFalse(c2.isStarted());
muleContext.start();
assertTrue(c.isStarted());
assertTrue(c2.isStarted());
muleContext.stop();
assertTrue(c.isStopped());
assertTrue(c2.isStopped());
muleContext.dispose();
assertTrue(c.isDisposed());
assertTrue(c2.isDisposed());
}