@Test
public void checkBoundsTest() {

    try {
        getMatrixFactory().create(-1, 1, 1);
        fail();
    } catch (IllegalArgumentException ignored) {
    }
    try {
        getMatrixFactory().create(1, -1, 1);
        fail();
    } catch (IllegalArgumentException ignored) {
    }
    Matrix a = getMatrixFactory().create(1, 1, 1);
    try {
        a.set(-1, 0, 0);
        fail();
    } catch (IllegalArgumentException ignored) {
    }
    try {
        a.set(0, -1, 0);
        fail();
    } catch (IllegalArgumentException ignored) {
    }
    try {
        a.set(2, 0, 0);
        fail();
    } catch (IllegalArgumentException ignored) {
    }
    try {
        a.set(0, 1, 0);
        fail();
    } catch (IllegalArgumentException ignored) {
    }
    try {
        a.add(2, 0, 0);
        fail();
    } catch (IllegalArgumentException ignored) {
    }
    try {
        a.add(0, 1, 0);
        fail();
    } catch (IllegalArgumentException ignored) {
    }
}