@Test public final void testOnApplicationEventShouldNotSwitchOffMessageLoggingWhenPropertyIsNull() { PropertyDto properties = builder.messageLogging(null).build(); given(configurationAccess.getProperties()).willReturn(properties); underTest.onApplicationEvent(event); verify(requestHandler, never()).disableProcessor(jmsRequestLogger); verify(responseHandler, never()).disableProcessor(jmsResponseProcessor); }
@Override public void onApplicationEvent(final ContextRefreshedEvent event) { PropertyDto properties = configurationAccess.getProperties(); String messageLogging = properties.getMessageLogging(); if (messageLogging != null && "off".equals(messageLogging)) { switchOffMessageLogging(); } }
MessageLoggingToggle implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(final ContextRefreshedEvent event) { PropertyDto properties = configurationAccess.getProperties(); String messageLogging = properties.getMessageLogging(); if (messageLogging != null && "off".equals(messageLogging)) { switchOffMessageLogging(); } } }
MessageLoggingToggle implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(final ContextRefreshedEvent event) { PropertyDto properties = configurationAccess.getProperties(); String messageLogging = properties.getMessageLogging(); if (messageLogging != null && "off".equals(messageLogging)) { switchOffMessageLogging(); } }  }
MessageLoggingToggle implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(final ContextRefreshedEvent event) { PropertyDto properties = configurationAccess.getProperties(); String messageLogging = properties.getMessageLogging(); if (messageLogging != null && "off".equals(messageLogging)) { switchOffMessageLogging(); } }  @Override void onApplicationEvent(final ContextRefreshedEvent event); void switchOffMessageLogging(); void switchOnMessageLogging(); boolean isRequestLoggingOn(); boolean isResponseLoggingOn(); }
MessageLoggingToggle implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(final ContextRefreshedEvent event) { PropertyDto properties = configurationAccess.getProperties(); String messageLogging = properties.getMessageLogging(); if (messageLogging != null && "off".equals(messageLogging)) { switchOffMessageLogging(); } }  @Override void onApplicationEvent(final ContextRefreshedEvent event); void switchOffMessageLogging(); void switchOnMessageLogging(); boolean isRequestLoggingOn(); boolean isResponseLoggingOn();  }