@Test
public void testAnotherBranchSeparateSmells() throws QueryException {

    Commit A0 = new Commit("0-A", 0);
    Commit B0 = new Commit("0-B", 1);
    Commit C0 = new Commit("0-C", 5);
    Commit A1 = new Commit("1-A", 2);
    Commit B1 = new Commit("1-B", 3);
    Commit C1 = new Commit("1-C", 4);
    // Determines the input order
    mockCommitSmells(A0, thirdSmell);
    mockCommitSmells(B0, firstSmell);
    mockCommitSmells(A1, secondSmell, thirdSmell);
    mockCommitSmells(B1, secondSmell, thirdSmell);
    mockCommitSmells(C1, secondSmell, thirdSmell);
    mockCommitSmells(C0, firstSmell, secondSmell, thirdSmell);
    mockCommitBranch(A0, 0, 0);
    mockCommitBranch(B0, 0, 1);
    mockCommitBranch(C0, 0, 2);
    mockLastBranchCommit(0, C0);
    mockCommitBranch(A1, 1, 0);
    mockCommitBranch(B1, 1, 1);
    mockCommitBranch(C1, 1, 2);
    mockLastBranchCommit(1, C1);
    mockMergeCommit(C0, C1);
    mockBranchParentCommitSmells(1, thirdSmell);
    getAnalysis().query();
    verify(persistence, times(3)).execute(any());
    verify(smellQueries).smellInsertionStatement(projectId, thirdSmell);
    verify(smellQueries).smellInsertionStatement(projectId, firstSmell);
    verify(smellQueries).smellInsertionStatement(projectId, secondSmell);
    verify(persistence, times(15)).addStatements(any());
    // Initial branch
    verify(smellQueries).smellCategoryInsertionStatement(projectId, A0.sha, thirdSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, A0.sha, thirdSmell, SmellCategory.INTRODUCTION);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, B0.sha, firstSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, B0.sha, firstSmell, SmellCategory.INTRODUCTION);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, B0.sha, thirdSmell, SmellCategory.REFACTOR);
    // Forked branch
    verify(smellQueries).smellCategoryInsertionStatement(projectId, A1.sha, secondSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, A1.sha, secondSmell, SmellCategory.INTRODUCTION);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, A1.sha, thirdSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, B1.sha, secondSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, B1.sha, thirdSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, C1.sha, secondSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, C1.sha, thirdSmell, SmellCategory.PRESENCE);
    // Merge commit
    verify(smellQueries).smellCategoryInsertionStatement(projectId, C0.sha, firstSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, C0.sha, secondSmell, SmellCategory.PRESENCE);
    verify(smellQueries).smellCategoryInsertionStatement(projectId, C0.sha, thirdSmell, SmellCategory.PRESENCE);
}