public class BaseEventPublisherTestCase extends TestCase {
EventPublisher publisher;
public void testFireListener() {
Event event = new TestEvent();
RuntimeEventListener listener = EasyMock.createMock(RuntimeEventListener.class);
listener.onEvent(EasyMock.same(event));
EasyMock.expectLastCall();
EasyMock.replay(listener);
publisher.addListener(listener);
publisher.publish(event);
EasyMock.verify(listener);