### Question:
App { public List<Snapshot> getSnapshotsFromRevCommits(List<RevCommit> historyOfFile) throws IOException, GitAPIException { List<Snapshot> snapshots = new ArrayList<>(); int index = 0; for (RevCommit commit : historyOfFile) { Snapshot snapshot = getFullSnapshotFromRevCommit(commit, index == 0, index, repository, git); snapshots.add(snapshot); index++; } for (int i = 0; i < snapshots.size(); i++) { Snapshot snapshot = snapshots.get(i); if (i == 0) { long nowUnx = new Date().getTime() / 1000; snapshots.get(i).setFromDate(snapshot.getCommitDate()); snapshots.get(i).setToDate(nowUnx); } else { Snapshot olderSnapshot = snapshots.get(i - 1); snapshots.get(i).setFromDate(snapshot.getCommitDate()); snapshots.get(i).setToDate(olderSnapshot.getCommitDate()); } } return snapshots; } App(String gitUrl, String gitHubUserName, String gitHubPassword);  App(String gitUrl); static void main(String[] args); List<Dockerfile> getDockerfileObjectsFromRawDockerfiles(List<File> rawDockerfiles); static void createJsonFromProjectObjectAndPrint(Project project, boolean printJson); Dockerfile getDockerfileObjectFromRawDockerfile(File rawDockerfile); void setDiffsBetweenSnapshots(List<Snapshot> snapshots); List<RevCommit> getRevCommitsOfRawDockerfile(String repoFolderNameDotGit, String relativePathToDockerfile); List<Snapshot> getSnapshotsFromRevCommits(List<RevCommit> historyOfFile); Snapshot getFullSnapshotFromRevCommit(RevCommit commit, boolean isCurrent, int index, Repository repository, Git git); List<ChangedFile> getChangedFilesForCommit(RevCommit commit); List<File> getDockerFilesFromGitRepository(String repoPath); String getRelativePathToDockerFile(String absolutePath); File getDockerfileFromCommit(RevCommit revCommit, Repository repository, String dockerPath, String localPath); void init(String gitUrl); Project getProjectFromGitUrl(); final static String LOCAL_REPO_FOLDER; final static String GITAPI; final static String REPOS; static String USERNAME; static String PASSWORD; }### Answer:
@Test public void getSnapshotsFromRevCommits() throws Exception { App app = appToBeTested; List<RevCommit> revCommits = revCommitsToBeTested; List<Snapshot> snapshots = app.getSnapshotsFromRevCommits(revCommits); assertEquals(snapshots.size(),7); }