### Question:
RuntimeDataPollingService implements Runnable { @Override public void run() { final PollingTimeslice pollingTimeslice = lastPolledService.getPollingTimeslice(); LOGGER.info("Start polling runtime data: {}", pollingTimeslice); pollUnfinishedProcessInstances(pollingTimeslice); pollFinishedProcessInstances(pollingTimeslice); lastPolledService.updatePollingTimeslice(pollingTimeslice); LOGGER.info("Finished polling runtime data: {}", pollingTimeslice); } RuntimeDataPollingService(PollingService pollingService, LastPolledService lastPolledService,
            EventService eventService, ApplicationProperties properties); @Override void run();  }### Answer:
@Test @DisplayName("Update of timeslice after polling") void updatePollingTimeslice() { when(lastPolledService.getPollingTimeslice()).thenReturn(new PollingTimeslice(CUTOFF_TIME.date, START_TIME.date, END_TIME.date)); pollingService.run(); final ArgumentCaptor<PollingTimeslice> pollingTimesliceCaptor = ArgumentCaptor.forClass(PollingTimeslice.class); verify(lastPolledService, times(1)).updatePollingTimeslice(pollingTimesliceCaptor.capture()); final PollingTimeslice updatePollingTimeslice = pollingTimesliceCaptor.getValue(); assertEquals(CUTOFF_TIME.date, updatePollingTimeslice.getCutoffTime()); assertEquals(START_TIME.date, updatePollingTimeslice.getStartTime()); assertEquals(END_TIME.date, updatePollingTimeslice.getEndTime()); }