### Question:
BasisFunctionKnots { public static BasisFunctionKnots fromKnots(double[] knots, int degree) { ArgChecker.notEmpty(knots, "knots"); ArgChecker.notNegative(degree, "degree"); int nKnots = knots.length; ArgChecker.isTrue(nKnots - 3 * degree > 0, "Require at least {} knots for degree {}, only given {}", 3 * degree + 1, degree, nKnots); for (int i = 1; i < nKnots; i++) { ArgChecker.isTrue(knots[i] - knots[i - 1] > 0, "knots are not ascending"); } int nSplines = nKnots - degree - 1; return new BasisFunctionKnots(knots, degree, nSplines); } private  BasisFunctionKnots(double[] knots, int degree, int nSplines); static BasisFunctionKnots fromUniform(double xa, double xb, int nKnots, int degree); static BasisFunctionKnots fromInternalKnots(double[] internalKnots, int degree); static BasisFunctionKnots fromKnots(double[] knots, int degree); double[] getKnots(); int getNumKnots(); int getDegree(); int getNumSplines();  }### Answer:
@Test public void testNullKnots() { assertThatIllegalArgumentException() .isThrownBy(() -> BasisFunctionKnots.fromKnots(null, 2)); }
@Test public void testNegDegree() { assertThatIllegalArgumentException() .isThrownBy(() -> BasisFunctionKnots.fromKnots(KNOTS, -1)); }
@Test public void testWrongOrderKnots() { assertThatIllegalArgumentException() .isThrownBy(() -> BasisFunctionKnots.fromKnots(WRONG_ORDER_KNOTS, 3)); }
@Test public void testDegreeToHigh3() { assertThatIllegalArgumentException() .isThrownBy(() -> BasisFunctionKnots.fromKnots(KNOTS, 11)); }