### Question:
MatrixChecker { static void checkInnerDimensions(@NonNull Matrix a, @NonNull Matrix b) { checkExpression(a.getCol() == b.getRow(), "Matrix inner dimensions must agree"); }    }### Answer:
@Test public void testCheckInnerDimension() { final Matrix a = Matrix.zeros(2, 3); final Matrix b = Matrix.zeros(3, 2); MatrixChecker.checkInnerDimensions(a, b); }
@Test(expected = IllegalArgumentException.class) public void testCheckInnerDimension2() { final Matrix a = Matrix.zeros(2, 3); final Matrix b = Matrix.zeros(3, 3); MatrixChecker.checkInnerDimensions(b, a); }