BusLifeCycleListener bl = EasyMock.createMock(BusLifeCycleListener.class);
Bus bus = new SpringBusFactory().createBus();
BusLifeCycleManager lifeCycleManager = bus.getExtension(BusLifeCycleManager.class);
lifeCycleManager.registerLifeCycleListener(bl);
EasyMock.reset(bl);
bl.preShutdown();
EasyMock.expectLastCall();
bl.postShutdown();
EasyMock.expectLastCall();
EasyMock.replay(bl);
bus.shutdown(true);