AlertRecoverySubscriber extends AbstractAlertEntitySubscriber { @VisibleForTesting protected void reportRecovered() { RecoveredAlertCleaner cleaner = new RecoveredAlertCleaner(); cleaner.future().addListener(commandFuture -> { if(commandFuture.isSuccess()) { Set<AlertEntity> recovered = commandFuture.getNow(); new ReportRecoveredAlertTask(recovered).execute(executors); } else { logger.warn("[reportRecovered]", commandFuture.cause()); } }); cleaner.execute(executors); }  @PostConstruct void scheduledRecoverAlertReport();  }
@Test public void reportRecovered() { subscriber.reportRecovered(); }