@Test
public void test05FailingRecently() {

    /*
        A history with multiple changes per build:
            * change0 -> buildGood[success1]
            * change1 -> buildBad1[failure1]
            * change2 -> buildNoRun[]
            * change3 -> buildBad2[failure1]
        gives a table highlighting buildBad1/change1 as the culprit. The irrelevant columns are hidden, i.e.
        buildNoRun and buildBad2 are not displayed.
                  | buildBad1
                  | change1
         ---------+----------
         failure1 | buildBad1
     */
    // arrange
    mockery.checking(new Expectations() {{
        allowing(buildBad2).getTestMessages(0, -1); will(returnValue(Collections.singletonList(test1FailureTestInfo)));
        allowing(test1FailureTestInfo).getTestName(); will(returnValue(test1TestName));
        allowing(buildNoRun).getTestMessages(0, -1); will(returnValue(Collections.emptyList()));
        allowing(buildNoRun).getBuildStatistics(BuildStatisticsOptions.ALL_TESTS_NO_DETAILS); will(returnValue(buildStatisticsNoRun));
        allowing(buildStatisticsNoRun).getAllTests(); will(returnValue(Collections.emptyList()));
        allowing(buildBad1).getTestMessages(0, -1); will(returnValue(Collections.singletonList(test1FailureTestInfo)));
        allowing(buildGood).getTestMessages(0, -1); will(returnValue(Collections.emptyList()));
        allowing(buildGood).getBuildStatistics(BuildStatisticsOptions.ALL_TESTS_NO_DETAILS); will(returnValue(buildStatisticsGood));
        allowing(buildStatisticsGood).getAllTests(); will(returnValue(Collections.singletonList(test1STestRun)));
        allowing(test1STestRun).getTest(); will(returnValue(test1STest));
        allowing(test1STest).getName(); will(returnValue(test1TestName));
    }});
    // act
    Table culpritTable = Analyser.createCulpritMatrix(Arrays.asList(
            new FinishedBuildWithChanges(buildBad2, change1, Collections.<SVcsModification>emptyList()),
            new FinishedBuildWithChanges(buildNoRun, change1, Collections.<SVcsModification>emptyList()),
            new FinishedBuildWithChanges(buildBad1, change1, Collections.singletonList(change1))));
    // assert
    assertThat(culpritTable.getNumberOfColumns(), is(1));
    assertThat(culpritTable.getNumberOfRows(), is(1));
    assertThat(culpritTable.getBuildRowCell(0).getContent().getBuild(), is(buildBad1));
    assertThat(culpritTable.getBuildRowCell(0).getColspan(), is(1));
    assertThat(culpritTable.getChangeRowCell(0).getContent(), is(change1));
    assertThat(culpritTable.getChangeRowCell(0).getColspan(), is(1));
    assertThat(culpritTable.getFailureColumnCell(0).getContent(), is(test1TestName));
    assertThat(culpritTable.getFailureColumnCell(0).getColspan(), is(1));
    assertThat(culpritTable.getCell(0, 0).getContent().getBuild(), is(buildBad1));
    assertThat(culpritTable.getCell(0, 0).getColspan(), is(1));
}