### Question:
DownloadStatusUpdater { @EventListener public void onNzbDownloadEvent(FileDownloadEvent downloadEvent) { if (!configProvider.getBaseConfig().getMain().isKeepHistory()) { return; } lastDownload = Instant.now(); queueCheckEnabled = true; historyCheckEnabled = true; logger.debug(LoggingMarkers.DOWNLOAD_STATUS_UPDATE, "Received download event. Will enable status updates for the next {} minutes", (MIN_SECONDS_SINCE_LAST_DOWNLOAD_TO_CHECK_STATUSES / 60)); }  @HydraTask(configId = "downloadHistoryCheck", name = "Download history check", interval = TEN_MINUTES_MS) @Transactional void checkHistoryStatus(); @HydraTask(configId = "downloadQueueCheck", name = "Download queue check", interval = TEN_SECONDS_MS) @Transactional void checkQueueStatus(); @EventListener void onNzbDownloadEvent(FileDownloadEvent downloadEvent);  }### Answer:
@Test public void shouldSetEnabledOnDownloadEvent() { testee.queueCheckEnabled = false; testee.lastDownload = null; testee.onNzbDownloadEvent(new FileDownloadEvent(new FileDownloadEntity(), new SearchResultEntity())); assertThat(testee.queueCheckEnabled).isTrue(); assertThat(testee.lastDownload).isNotNull(); }