EasyMock.verify(listener1);
}
public void testDuplicateRegistration() {
BusLifeCycleListener listener1 = EasyMock.createMock(BusLifeCycleListener.class);
CeltixBusLifeCycleManager mgr = new CeltixBusLifeCycleManager();
mgr.registerLifeCycleListener(listener1);
mgr.registerLifeCycleListener(listener1);
EasyMock.reset(listener1);
listener1.initComplete();
EasyMock.expectLastCall().times(2);
EasyMock.replay(listener1);
mgr.initComplete();
EasyMock.verify(listener1);
EasyMock.reset(listener1);
listener1.preShutdown();
EasyMock.expectLastCall().times(2);
EasyMock.replay(listener1);
mgr.preShutdown();
EasyMock.verify(listener1);
EasyMock.reset(listener1);
listener1.postShutdown();
EasyMock.expectLastCall().times(2);
EasyMock.replay(listener1);
mgr.postShutdown();
EasyMock.verify(listener1);
}