@Test
public void testInsertCommit() throws Exception {

    addCommitInPaprika(A);
    addCommitInRepository(A);
    addCommitInPaprika(B);
    addCommitInRepository(B);
    addCommitInPaprika(C);
    addCommitInRepository(C);
    addCommitInPaprika(D);
    addCommitInRepository(D);
    prepareGitLog(A, B, C, D);
    getCommitsAnalysis().query();
    verify(commitQueries, times(4)).commitInsertionStatement(anyInt(), any(Commit.class), any(GitDiff.class));
    verify(commitQueries).commitInsertionStatement(projectId, A, dummyDetails.diff);
    verify(commitQueries).commitInsertionStatement(projectId, B, dummyDetails.diff);
    verify(commitQueries).commitInsertionStatement(projectId, C, dummyDetails.diff);
    verify(commitQueries).commitInsertionStatement(projectId, D, dummyDetails.diff);
    // Author insertion is brainlessly done at each encounter
    verify(developerQueries, times(4)).developerInsertStatement(anyString());
    verify(developerQueries, times(2)).developerInsertStatement(A.authorEmail);
    verify(developerQueries, times(2)).developerInsertStatement(C.authorEmail);
    verify(developerQueries, times(4)).projectDeveloperInsertStatement(eq(projectId), anyString());
    verify(developerQueries, times(2)).projectDeveloperInsertStatement(projectId, A.authorEmail);
    verify(developerQueries, times(2)).projectDeveloperInsertStatement(projectId, C.authorEmail);
    // No GitRename handled
    verify(commitQueries, times(0)).fileRenameInsertionStatement(eq(projectId), anyString(), any(GitRename.class));
}