### Question:
JmsEventTransportImpl extends AbstractRegisterableTransport implements EventTransport, ApplicationContextAware, InitializingBean { @Required public void setErrorHandler(EventErrorHandler errorHandler) { this.errorHandler = errorHandler; } JmsEventTransportImpl(ConnectionFactory connectionFactory); void init(); void initThreadPool(); void initialiseExecutionContext(); void destroy(); @Override void publish(Event event); void publish(Event event, String destinationName, EventServiceBindingDescriptor eventServiceBindingDescriptor); Future<Boolean> requestConnectionToBroker(); void closeConnection(); @Override void subscribe(String eventName, Object[] args, final ExecutionObserver observer); DestinationType getDestinationType(); @Required void setDestinationType(DestinationType destinationType); void setThreadPoolSize(int threadPoolSize); JMSEventMarshaller getEventMarshaller(); @Required void setEventMarshaller(JMSEventMarshaller eventMarshaller); EventUnMarshaller getEventUnMarshaller(); @Required void setEventUnMarshaller(EventUnMarshaller eventUnMarshaller); EventErrorHandler getErrorHandler(); @Required void setErrorHandler(EventErrorHandler errorHandler); @Override void notify(BindingDescriptor bindingDescriptor); @Override void notify(BindingDescriptor bindingDescriptor, EventTransportMode mode); JMSDestinationResolver<String> getDestinationResolver(); @Required void setDestinationResolver(JMSDestinationResolver<String> destinationResolver); void setMonitorRegistry(MonitorRegistry monitorRegistry); @Required void setConnectionMonitor(ConnectionMonitor connectionMonitor); @Override void setApplicationContext(ApplicationContext applicationContext); @Override void afterPropertiesSet(); int getAcknowledgementMode(); void setAcknowledgementMode(int acknowledgementMode); ExecutionContext getExecutionContext(); void setExecutionContext(final ExecutionContext executionContext); String getTransportIdentifier(); void setTransportIdentifier(String transportIdentifier); String getUsername(); @Required void setUsername(String username); String getPassword(); @Required void setPassword(String password);  }### Answer:
@Test public void testOnMessage3() throws JMSException { cut.setErrorHandler(faultyErrorHandler); TopicSubscriberPingMonitor pingMonitor = mock(TopicSubscriberPingMonitor.class); JmsEventTransportImpl.SubscriptionMessageListener sml=cut.new SubscriptionMessageListener(faultyExecutionObserver,null, pingMonitor); TextMessage mockedMessage = Mockito.mock(TextMessage.class); sml.onMessage(mockedMessage); }