SequenceHandlingToggle implements ApplicationListener<ContextRefreshedEvent> { public boolean isOn() { return sequenceRequestHandlingProcessor.isEnabled(); }  void switchOn(); void switchOff(); boolean isOn(); @Override void onApplicationEvent(final ContextRefreshedEvent event);  }
@Test public void testIsOnShouldReturnFalseWhenSequenceHandlingIsDisabled() { given(sequenceRequestHandlingProcessor.isEnabled()).willReturn(false); boolean result = underTest.isOn(); assertFalse(result); }
@Test public void testIsOnShouldReturnTrueWhenSequenceHandlingIsEnabled() { given(sequenceRequestHandlingProcessor.isEnabled()).willReturn(true); boolean result = underTest.isOn(); assertTrue(result); }