AlertSystemOffChecker extends AbstractConsoleHealthChecker { @Override boolean stop() { return configService.isAlertSystemOn(); }    }
@Test public void stop() throws Exception { when(configService.isAlertSystemOn()).thenReturn(true); Assert.assertTrue(checker.stop()); when(configService.isAlertSystemOn()).thenReturn(false); Assert.assertFalse(checker.stop()); }