### Question:
MatrixChecker { static void verifyArrays(@NonNull double[][] arrays) { checkNotNull(arrays); final int m = arrays.length; checkExpression(m > 0, "Row should be positive"); final int n = arrays[0].length; for (int i = 1; i < m; ++i) { checkExpression(arrays[i].length == n, "All rows must have the same length"); } }    }### Answer:
@Test public void testVerifyArrays() { final double[][] arrays = new double[][]{ new double[]{1, 2, 3}, new double[]{4, 5, 6} }; MatrixChecker.verifyArrays(arrays); }
@Test(expected = IllegalArgumentException.class) public void testVerifyArrays2() { MatrixChecker.verifyArrays(new double[0][0]); }
@Test(expected = IllegalArgumentException.class) public void testVerifyArrays3() { final double[][] arrays = new double[][]{ new double[]{1, 2, 3}, new double[]{4, 5, 6, 4} }; MatrixChecker.verifyArrays(arrays); }