@Test
public void fix() throws Exception {

    CompatibilityMatrix m = new CompatibilityMatrix(5, 5);
    m.set(0, 1);
    m.set(0, 2);
    m.set(0, 4);
    m.set(1, 0);
    m.set(1, 3);
    m.set(2, 4);
    assertThat(m.fix(), is(new int[][]{{0, 1, 1, 0, 1}, {1, 0, 0, 1, 0}, {0, 0, 0, 0, 1}, {0, 0, 0, 0, 0},
            {0, 0, 0, 0, 0},}));
}