EventConsumer extends MessageConsumer { @Override public void handleMessage(Message message) { Object event = buildEvent(message); eventControl.fire(event); } EventConsumer(Event<Object> eventControl, Instance<Object> eventPool); @Override void handleMessage(Message message);  }
@Test public void testHandleMessageShouldFireEvent() { EventConsumer eventConsumer = buildEventConsumer(TestEventOne.class); eventConsumer.handleMessage(new Message()); Assert.assertEquals(1, TestConsumer.countOne); Assert.assertEquals(0, TestConsumer.countTwo); Assert.assertEquals(1, TestConsumer.countAll); }