DefaultConsoleDbConfig extends AbstractConfigBean implements ConsoleDbConfig { @Override public boolean isSentinelAutoProcess() { return configService.isSentinelAutoProcess(); }  @PostConstruct void postConstruct(); @Override boolean isSentinelAutoProcess(); @Override boolean isAlertSystemOn(); @Override boolean ignoreMigrationSystemAvailability(); @Override boolean shouldSentinelCheck(String cluster, boolean disableCache); @Override Set<String> sentinelCheckWhiteList(boolean disableCache); static final String KEY_SENTINEL_AUTO_PROCESS; static final String KEY_ALERT_SYSTEM_ON; static final String KEY_IGNORE_MIGRATION_SYSTEM_AVAILABILITY; static final String KEY_SENTINEL_CHECK_EXCLUDE; }
@Test public void test() throws DalException { String key = DefaultConsoleDbConfig.KEY_SENTINEL_AUTO_PROCESS; configModel.setKey(key).setVal("true"); configDao.setConfig(configModel); Assert.assertTrue(consoleDbConfig.isSentinelAutoProcess()); service.stopSentinelAutoProcess(configModel, 3); Assert.assertFalse(consoleDbConfig.isSentinelAutoProcess()); service.stopSentinelAutoProcess(configModel, -1); Assert.assertTrue(consoleDbConfig.isSentinelAutoProcess()); service.stopSentinelAutoProcess(configModel, 8); Assert.assertFalse(consoleDbConfig.isSentinelAutoProcess()); service.startSentinelAutoProcess(configModel); Assert.assertTrue(consoleDbConfig.isSentinelAutoProcess()); }