@Test
public void testServiceIsDisabled() throws Exception {

  Configuration configuration = m_injector.getInstance(Configuration.class);
  EasyMock.expect(configuration.isAlertCacheEnabled()).andReturn(Boolean.FALSE).atLeastOnce();
  // mock the stopAsync method
  CachedAlertFlushService service = PowerMockito.spy(new CachedAlertFlushService());
  PowerMockito.doReturn(null).when(service).stopAsync();
  replayAll();
  m_injector.injectMembers(service);
  service.startUp();
  PowerMockito.verifyPrivate(service).invoke("stopAsync");
  verifyAll();
}