@Test
public void test10Regression() {

    /*
        I broke the table construction by a change I made. This is a regression test and my way of repentance.
        And I use it for TDD-ing my fix.
        If one change breaks test1 (and doesn't run test2), and the next change additionally breaks test2 (while
        running both test1 and test),
            * change0 -> buildGood[success1, success2]
            * change1 -> buildBad1[failure1]
            * change2 -> buildBad2[failure1, failure2]
        the table should look like this:
                  | buildBad2 | buildBad1
                  | change2   | change1
         ---------+-----------+----------
         failure1 |           | buildBad1
         failure2 |       buildBad2
    */
    // arrange
    mockery.checking(new Expectations() {{
        allowing(buildBad2).getTestMessages(0, -1); will(returnValue(Arrays.asList(test1FailureTestInfo, test2FailureTestInfo)));
        allowing(test1FailureTestInfo).getTestName(); will(returnValue(test1TestName));
        allowing(test2FailureTestInfo).getTestName(); will(returnValue(test2TestName));
        allowing(buildBad1).getTestMessages(0, -1); will(returnValue(Collections.singletonList(test1FailureTestInfo)));
        allowing(buildBad1).getBuildStatistics(BuildStatisticsOptions.ALL_TESTS_NO_DETAILS); will(returnValue(buildStatisticsNoRun));
        allowing(buildStatisticsNoRun).getAllTests(); will(returnValue(Arrays.asList(test1STestRun)));
        allowing(test1STestRun).getTest(); will(returnValue(test1STest));
        allowing(test1STest).getName(); will(returnValue(test1TestName));
        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(Arrays.asList(test1STestRun, test2STestRun)));
        allowing(test2STestRun).getTest(); will(returnValue(test2STest));
        allowing(test2STest).getName(); will(returnValue(test2TestName));
    }});
    // act
    Table culpritTable = Analyser.createCulpritMatrix(Arrays.asList(
            new FinishedBuildWithChanges(buildBad2, change2, Collections.singletonList(change2)),
            new FinishedBuildWithChanges(buildBad1, change1, Collections.singletonList(change1)),
            new FinishedBuildWithChanges(buildGood, change0, Collections.singletonList(change0))));
    // assert
    assertThat(culpritTable.getNumberOfColumns(), is(2));
    assertThat(culpritTable.getNumberOfRows(), is(2));
    assertThat(culpritTable.getBuildRowCell(0).getContent().getBuild(), is(buildBad2));
    assertThat(culpritTable.getBuildRowCell(0).getColspan(), is(1));
    assertThat(culpritTable.getBuildRowCell(1).getContent().getBuild(), is(buildBad1));
    assertThat(culpritTable.getBuildRowCell(1).getColspan(), is(1));
    assertThat(culpritTable.getChangeRowCell(0).getContent(), is(change2));
    assertThat(culpritTable.getChangeRowCell(0).getColspan(), is(1));
    assertThat(culpritTable.getChangeRowCell(1).getContent(), is(change1));
    assertThat(culpritTable.getChangeRowCell(1).getColspan(), is(1));
    assertThat(culpritTable.getFailureColumnCell(0).getContent(), is(test1TestName));
    assertThat(culpritTable.getFailureColumnCell(0).getColspan(), is(1));
    assertThat(culpritTable.getFailureColumnCell(1).getContent(), is(test2TestName));
    assertThat(culpritTable.getFailureColumnCell(1).getColspan(), is(1));
    assertThat(culpritTable.getCell(0, 0).getContent(), nullValue());
    assertThat(culpritTable.getCell(0, 0).getColspan(), is(1));
    assertThat(culpritTable.getCell(0, 1).getContent().getBuild(), is(buildBad1));
    assertThat(culpritTable.getCell(0, 1).getColspan(), is(1));
    assertThat(culpritTable.getCell(1, 0).getContent().getBuild(), is(buildBad2));
    assertThat(culpritTable.getCell(1, 0).getColspan(), is(2));
    assertThat(culpritTable.getCell(1, 1), nullValue());
}