### Question:
MessageEventService { public final boolean hasHandlers( final Message eventType ) { return containsHandlerFor( eventType ); } MessageEventService(); void fireEvent( final Message event ); final void addHandler( final Message eventType, final MessageEventHandler handler ); final boolean hasHandlers( final Message eventType ); List<MessageEventHandler> getHandlersFor( final Message eventType );  }### Answer:
@Test public void testTransformationHasHandler() throws KettleException { addHandlers( transformationMessageEvent, messageEventHandler, messageEventHandler2 ); assertTrue( messageEventService.hasHandlers( transformationMessageEvent ) ); }
@Test public void testTransformationHasHandlerFalseTrans() throws KettleException { addHandlers( transformationMessageEvent, messageEventHandler, messageEventHandler2 ); assertFalse( messageEventService.hasHandlers( otherTransMessageEvent ) ); }
@Test public void testTransformationHasHandlerFalseOp() throws KettleException { addHandlers( transformationMessageEvent, messageEventHandler, messageEventHandler2 ); assertFalse( messageEventService.hasHandlers( otherOpMessageEvent ) ); }
@Test public void testOperationHasHandler() throws KettleException { addHandlers( operationMessageEvent, messageEventHandler, messageEventHandler2 ); assertTrue( messageEventService.hasHandlers( operationMessageEvent ) ); }
@Test public void testOperationHasHandlerFalseTrans() throws KettleException { addHandlers( operationMessageEvent, messageEventHandler, messageEventHandler2 ); assertFalse( messageEventService.hasHandlers( otherTransMessageEvent ) ); }
@Test public void testOperationHasHandlerFalseOp() throws KettleException { addHandlers( operationMessageEvent, messageEventHandler, messageEventHandler2 ); assertFalse( messageEventService.hasHandlers( otherOpMessageEvent ) ); }