public void testDispatcherFullLifecycle() throws Exception
{
OutboundEndpoint out = getTestOutboundEndpoint("out", "test://out", null, null, null, connector);
MessageDispatcher dispatcher = connector.getDispatcherFactory().create(out);
dispatcher.initialise();
assertTrue(dispatcher.getLifecycleState().isInitialised());
dispatcher.connect();
assertTrue(dispatcher.isConnected());
dispatcher.start();
assertTrue(dispatcher.getLifecycleState().isStarted());
dispatcher.stop();
assertTrue(dispatcher.getLifecycleState().isStopped());
dispatcher.disconnect();
assertFalse(dispatcher.isConnected());
dispatcher.dispose();
assertTrue(dispatcher.getLifecycleState().isDisposed());
}