@Test
public void testMergeCommitInserted() throws IOException, QueryException {

    Commit merged = new Commit("a", 51,
            DateTime.now(), "message", "first@email.com", new ArrayList<>());
    Commit parent = new Commit("b", 53,
            DateTime.now(), "message", "second@email.com", new ArrayList<>());
    ArrayList<Commit> parents = new ArrayList<>();
    parents.add(parent);
    parents.add(merged);
    Commit merge = new Commit("c", 54,
            DateTime.now(), "message", "author@email.com", parents);
    addCommitInPaprika(merged);
    addCommitInRepository(merged);
    addCommitInPaprika(parent);
    addCommitInRepository(parent);
    addCommitInPaprika(merge);
    addCommitInRepository(merge);
    prepareGitLog(merged, parent, merge);
    getCommitsAnalysis().query();
    verify(commitQueries, times(3)).commitInsertionStatement(anyInt(), any(Commit.class), any(GitDiff.class));
    verify(commitQueries).commitInsertionStatement(projectId, merged, dummyDetails.diff);
    verify(commitQueries).commitInsertionStatement(projectId, parent, dummyDetails.diff);
    verify(commitQueries).commitInsertionStatement(projectId, merge, dummyDetails.diff);
    // Author insertion is brainlessly done at each encounter
    verify(developerQueries, times(3)).developerInsertStatement(anyString());
    verify(developerQueries, times(1)).developerInsertStatement(merged.authorEmail);
    verify(developerQueries, times(1)).developerInsertStatement(parent.authorEmail);
    verify(developerQueries, times(1)).developerInsertStatement(merge.authorEmail);
    verify(developerQueries, times(3)).projectDeveloperInsertStatement(eq(projectId), anyString());
    verify(developerQueries, times(1)).projectDeveloperInsertStatement(projectId, merged.authorEmail);
    verify(developerQueries, times(1)).projectDeveloperInsertStatement(projectId, parent.authorEmail);
    verify(developerQueries, times(1)).projectDeveloperInsertStatement(projectId, merge.authorEmail);
    // No GitRename handled
    verify(commitQueries, times(0)).fileRenameInsertionStatement(eq(projectId), anyString(), any(GitRename.class));
}