### Question:
ControlPointValidations { public static void checkUpdateControlPoint(final ControlPoint[] controlPoints1, final ControlPoint[] controlPoints2) { if (cannotControlPointsBeUpdated.test(controlPoints1, controlPoints2)) { throw new IllegalArgumentException("The control points cannot be updated, length differs " + "[" + length(controlPoints1) + ":" + length(controlPoints2) + "]."); } }  static void checkAddControlPoint(final ControlPoint[] controlPoints,
                                            final ControlPoint controlPoint,
                                            final int index); static void checkDeleteControlPoint(final ControlPoint[] controlPoints,
                                               final int index); static void checkUpdateControlPoint(final ControlPoint[] controlPoints1,
                                               final ControlPoint[] controlPoints2); static Predicate<Integer> isControlPointIndexInvalid; static Predicate<ControlPoint> isControlPointInvalid; static BiPredicate<ControlPoint[], Integer> isAddingControlPointIndexForbidden; static BiPredicate<ControlPoint[], Integer> isDeletingControlPointIndexForbidden; static BiPredicate<ControlPoint[], ControlPoint[]> cannotControlPointsBeUpdated; }### Answer:
@Test public void testValidCheckUpdateControlPoints() { ControlPoint controlPoint2 = ControlPoint.build(1, 1); ControlPoint[] controlPoints2 = new ControlPoint[]{controlPoint2}; checkUpdateControlPoint(controlPoints, controlPoints2); }
@Test(expected = IllegalArgumentException.class) public void testInvalidCheckUpdateControlPoints() { ControlPoint[] controlPoints2 = new ControlPoint[0]; checkUpdateControlPoint(controlPoints, controlPoints2); }