MessageLoggingToggle implements ApplicationListener<ContextRefreshedEvent> { public void switchOffMessageLogging() { requestProcessor.disableProcessor(jmsRequestLoggerProcessor); responseProcessor.disableProcessor(jmsResponseProcessor); }  @Override void onApplicationEvent(final ContextRefreshedEvent event); void switchOffMessageLogging(); void switchOnMessageLogging(); boolean isRequestLoggingOn(); boolean isResponseLoggingOn();  }
@Test public final void testSwitchOffMessageLoggingRemovesBothProcessors() { underTest.switchOffMessageLogging(); verify(requestHandler).disableProcessor(jmsRequestLogger); verify(responseHandler).disableProcessor(jmsResponseProcessor); }