AlertPolicyManager { public void markCheckInterval(ALERT_TYPE alertType, LongSupplier checkInterval) { if(recoveryTimeController == null) { recoveryTimeController = new RecoveryTimeSlotControl(consoleConfig); } recoveryTimeController.mark(alertType, checkInterval); }  @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 testMarkCheckInterval() throws Exception { int checkInterval = randomInt(); policyManager.markCheckInterval(ALERT_TYPE.MARK_INSTANCE_UP, ()->checkInterval); alert.setAlertType(ALERT_TYPE.MARK_INSTANCE_UP); Assert.assertEquals(new NaiveRecoveryTimeAlgorithm().calculate(checkInterval), policyManager.queryRecoverMilli(alert)); }