AlertEntityImmediateSubscriber extends AbstractAlertEntitySubscriber { @PostConstruct public void initCleaner() { scheduled.scheduleWithFixedDelay(new AbstractExceptionLogTask() { @Override protected void doRun() { try { lock.lock(); logger.debug("[initCleaner][before]sent alerts: {}", existingAlerts); existingAlerts.removeIf(alert -> alertRecovered(alert)); logger.debug("[initCleaner][after]send alerts: {}", existingAlerts); } finally { lock.unlock(); } } }, 1, 1, TimeUnit.MINUTES); }  @PostConstruct void initCleaner(); @VisibleForTesting Set<AlertEntity> getExistingAlerts(); @VisibleForTesting Set<AlertEntity> getSendingAlerts();  }
@Test public void initCleaner() { }