### Question:
FlatCurveExtrapolator implements CurveExtrapolator, Serializable { @Override public BoundCurveExtrapolator bind(DoubleArray xValues, DoubleArray yValues, BoundCurveInterpolator interpolator) { return new Bound(xValues, yValues); } private  FlatCurveExtrapolator(); @Override String getName(); @Override BoundCurveExtrapolator bind(DoubleArray xValues, DoubleArray yValues, BoundCurveInterpolator interpolator); @Override String toString(); static final String NAME; static final CurveExtrapolator INSTANCE; }### Answer:
@Test public void test_extrapolation() { BoundCurveInterpolator bci = CurveInterpolators.LINEAR.bind(X_DATA, Y_DATA, FLAT_EXTRAPOLATOR, FLAT_EXTRAPOLATOR); for (int i = 0; i < 100; i++) { final double x = RANDOM.nextDouble() * 20.0 - 10; if (x < 0) { assertThat(bci.interpolate(x)).isCloseTo(3.0, offset(1e-12)); assertThat(bci.firstDerivative(x)).isCloseTo(0.0, offset(1e-12)); assertThat(bci.parameterSensitivity(x).get(0)).isCloseTo(1.0, offset(1e-12)); } else if (x > 5.0) { assertThat(bci.interpolate(x)).isCloseTo(2.0, offset(1e-12)); assertThat(bci.firstDerivative(x)).isCloseTo(0.0, offset(1e-12)); assertThat(bci.parameterSensitivity(x).get(X_DATA.size() - 1)).isCloseTo(1.0, offset(1e-12)); } } }