@Test
public void testHandlePresenceAndIntroductionOnSingleCommitNotLastCommit() throws QueryException {

    addSmell(firstCommit, firstSmell);
    String lastCommitSha = "another";
    mockCommitBranch(firstCommit, 0, 0);
    mockGapCommit(lastCommitSha, 0, 1);
    mockLastBranchCommit(0, lastCommitSha);
    getAnalysis().query();
    debugSmellInsertions();
    verify(persistence, times(1)).execute(any());
    verify(smellQueries).smellInsertionStatement(projectId, firstSmell);
    verify(persistence, times(3)).addStatements(any());
    verify(smellQueries).smellCategoryInsertionStatement(projectId, firstCommit.sha, firstSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, firstCommit.sha, firstSmell, SmellCategory.INTRODUCTION);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, lastCommitSha, firstSmell, SmellCategory.REFACTOR);
}