DownloadsSessionManager { public void addSession(long userId, String fileName, long totalSize) { sessionsPerUser.put(userId, new DownloadSession(fileName, totalSize)); filesPerUser.put(userId, fileName); LOGGER.debug("Session added: {} {}", userId, fileName); } DownloadsSessionManager(); Download getDownload(long userId); void removeSession(long userId); DownloadSession getSession(Long userId); DownloadSession getSession(String filename); void addSession(long userId, String fileName, long totalSize); void abortSession(long userId);  }
@Test public void shouldAddSession() throws Exception { manager.addSession(USER_ID, FILENAME, 1000); }