ReplayService extends PlayerService<ReplayRequest> implements Runnable { public int replay(String playerName, String timestamp) { logger.info("Attempting to start replay for : {}, timestamp: {} ", playerName, timestamp); int replayId = inc.incrementAndGet(); scheduledReplays.add(new ReplayRequest(configuration, playerName, timestamp, replayId)); return replayId; }  @PostConstruct void init(); @PreDestroy void destroy(); int replay(String playerName, String timestamp); @Override void run(); boolean hasScheduledReplays(); void cancelReplay(int replayId);  }
@Test public void shouldSendUpdatesOnceWhenSeveralGamesReplaying() throws InterruptedException { create1LineLog("user1", "123"); create1LineLog("user2", "321"); replayService.replay("user1", "123"); replayService.replay("user2", "321"); waitForAllReplaysDone(); verifyScreensSent1Time(); assertContainsSFigurePlots(getPlotsFor("user1"), 0, 0); assertContainsSFigurePlots(getPlotsFor("user2"), 0, 0); }