### Question:
ProductPiecewisePolynomialInterpolator extends PiecewisePolynomialInterpolator { @Override public PiecewisePolynomialResult interpolate(double[] xValues, double[] yValues) { ArgChecker.notNull(xValues, "xValues"); ArgChecker.notNull(yValues, "yValues"); ArgChecker.isTrue(xValues.length == yValues.length, "xValues length = yValues length"); PiecewisePolynomialResult result; if (_isClamped) { double[][] xyValuesAll = getDataTotal(xValues, yValues); result = _baseMethod.interpolate(xyValuesAll[0], xyValuesAll[1]); } else { double[] xyValues = getProduct(xValues, yValues); result = _baseMethod.interpolate(xValues, xyValues); } return extrapolateByLinearFunction(result, xValues); } ProductPiecewisePolynomialInterpolator(PiecewisePolynomialInterpolator baseMethod);  ProductPiecewisePolynomialInterpolator(PiecewisePolynomialInterpolator baseMethod, double[] xValuesClamped,
      double[] yValuesClamped); @Override PiecewisePolynomialResult interpolate(double[] xValues, double[] yValues); @Override PiecewisePolynomialResult interpolate(double[] xValues, double[][] yValuesMatrix); @Override PiecewisePolynomialResultsWithSensitivity interpolateWithSensitivity(double[] xValues, double[] yValues); @Override PiecewisePolynomialInterpolator getPrimaryMethod();  }### Answer:
@Test public void dataDifferentLengthTest() { double[] xValues = new double[] {-5.0, -1.4, 3.2, 3.5, 7.6}; double[] yValues = new double[] {-2.2, 1.1, 1.9, 2.3}; ProductPiecewisePolynomialInterpolator interp = new ProductPiecewisePolynomialInterpolator(INTERP_SENSE[1]); assertThatIllegalArgumentException() .isThrownBy(() -> interp.interpolate(xValues, yValues)); }
@Test public void notImplementedTest() { double[] xValues = new double[] {-5.0, -1.4, 3.2, 3.5, 7.6}; double[][] yValues = new double[][] {{-2.2, 1.1, 1.9, 2.3, 1.2}, {-2.2, 1.1, 1.9, 2.3, 1.2}}; ProductPiecewisePolynomialInterpolator interp = new ProductPiecewisePolynomialInterpolator(INTERP_SENSE[1]); assertThatExceptionOfType(UnsupportedOperationException.class) .isThrownBy(() -> interp.interpolate(xValues, yValues)); }