import org.junit.Test;
import org.junit.Ignore;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;

public class PascalsTriangleTest {


    @Test
    public void testTriangleWithFourRows() {
        int[][] expectedOutput = new int[][]{
                {1},
                {1, 1},
                {1, 2, 1},
                {1, 3, 3, 1},
        };

        assertArrayEquals(expectedOutput, PascalsTriangle.computeTriangle(4));
    }

    @Ignore
    @Test
    public void testTriangleWithSixRows() {
        int[][] expectedOutput = new int[][]{
                {1},
                {1, 1},
                {1, 2, 1},
                {1, 3, 3, 1},
                {1, 4, 6, 4, 1},
                {1, 5, 10, 10, 5, 1}
        };

        assertArrayEquals(expectedOutput, PascalsTriangle.computeTriangle(6));
    }

    @Ignore
    @Test
    public void testExpectEmptyTriangle() {
        int[][] expectedOutput = new int[][]{

        };

        assertArrayEquals(expectedOutput, PascalsTriangle.computeTriangle(0));
    }

    @Ignore
    @Test
    public void testValidInput() {
        int[][] input = new int[][]{
                {1},
                {1, 1},
                {1, 2, 1},
                {1, 3, 3, 1},
                {1, 4, 6, 4, 1},
        };

        assertEquals(true, PascalsTriangle.isTriangle(input));
    }

    @Ignore
    @Test
    public void testInvalidInput() {
        int[][] input = new int[][]{
                {1},
                {1, 1},
                {1, 2, 1},
                {1, 4, 4, 1},
        };

        assertEquals(false, PascalsTriangle.isTriangle(input));
    }

    @Ignore
    @Test(expected = IllegalArgumentException.class)
    public void testValidatesNotNegativeRows() {
        PascalsTriangle.computeTriangle(-1);
    }
}

@@ -41,16 +41,82 @@
 Ignore;%0A
+import org.junit.Rule;%0Aimport org.junit.rules.ExpectedException;%0A%0A
 %0Aimport 
@@ -240,16 +240,94 @@
 Test %7B%0A%0A
+    @Rule%0A    public ExpectedException thrown = ExpectedException.none();%0A    
 %0A    @Te
@@ -1830,51 +1830,8 @@
 Test
-(expected = IllegalArgumentException.class)
 %0A   
@@ -1868,32 +1868,87 @@
 egativeRows() %7B%0A
+        thrown.expect(IllegalArgumentException.class);%0A
         PascalsT

use JUnit's @Rule feature