@Test
public void testHandleNoChange() throws QueryException {

    addSmell(firstCommit, firstSmell);
    addSmell(secondCommit, firstSmell);
    mockCommitBranch(firstCommit, 0, 0);
    mockCommitBranch(secondCommit, 0, 1);
    mockLastBranchCommit(0, secondCommit);
    getAnalysis().query();
    verify(persistence, times(1)).execute(any());
    // We have only one smell insertion here since we check for existence in the previous commit.
    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, secondCommit.sha, firstSmell, SmellCategory.PRESENCE);
}