@Test
public void testHandleRefactorOnly() throws QueryException {

    addSmell(firstCommit, firstSmell);
    addSmell(firstCommit, secondSmell);
    addSmell(secondCommit, firstSmell);
    mockCommitBranch(firstCommit, 0, 0);
    mockCommitBranch(secondCommit, 0, 1);
    mockLastBranchCommit(0, secondCommit);
    getAnalysis().query();
    verify(persistence, times(2)).execute(any());
    verify(smellQueries).smellInsertionStatement(projectId, firstSmell);
    verify(smellQueries).smellInsertionStatement(projectId, secondSmell);
    verify(persistence, times(6)).addStatements(any());
    verify(smellQueries).smellCategoryInsertionStatement(projectId, firstCommit.sha, firstSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, firstCommit.sha, firstSmell, SmellCategory.INTRODUCTION);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, firstCommit.sha, secondSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, firstCommit.sha, secondSmell, SmellCategory.INTRODUCTION);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, secondCommit.sha, firstSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, secondCommit.sha, secondSmell, SmellCategory.REFACTOR);
}