AlertPolicyManager { public long queryRecoverMilli(AlertEntity alert) { return recoveryTimeController.durationMilli(alert); }  @PostConstruct void initPolicies(); List<AlertChannel> queryChannels(AlertEntity alert); long queryRecoverMilli(AlertEntity alert); long querySuspendMilli(AlertEntity alert); EmailReceiverModel queryEmailReceivers(AlertEntity alert); void markCheckInterval(ALERT_TYPE alertType, LongSupplier checkInterval); Map<EmailReceiverModel, Map<ALERT_TYPE, Set<AlertEntity>>> queryGroupedEmailReceivers(
            AlertEntityHolderManager alerts);  }
@Test public void queryRecoverMinute() throws Exception { alert = new AlertEntity(new HostPort("192.168.1.10", 6379), dcNames[0], "clusterId", "shardId", "test message", ALERT_TYPE.QUORUM_DOWN_FAIL); long milli = policyManager.queryRecoverMilli(alert); long expect = TimeUnit.MINUTES.toMillis(consoleConfig.getAlertSystemRecoverMinute()); Assert.assertEquals(expect, milli); alert = new AlertEntity(new HostPort("192.168.1.10", 6379), dcNames[0], "clusterId", "shardId", "test message", ALERT_TYPE.CLIENT_INCONSIS); milli = policyManager.queryRecoverMilli(alert); expect = consoleConfig.getRedisConfCheckIntervalMilli(); Assert.assertEquals(expect, milli); }