### Question:
CombinedCurve implements Curve, ImmutableBean, Serializable { @Override public double yValue(double x) { return baseCurve.yValue(x) + spreadCurve.yValue(x); } @ImmutableConstructor private  CombinedCurve(
      Curve baseCurve,
      Curve spreadCurve,
      CurveMetadata metadata); static CombinedCurve of(Curve baseCurve, Curve spreadCurve, CurveMetadata metadata); static CombinedCurve of(Curve baseCurve, Curve spreadCurve); @Override CombinedCurve withMetadata(CurveMetadata metadata); @Override int getParameterCount(); @Override double getParameter(int parameterIndex); @Override ParameterMetadata getParameterMetadata(int parameterIndex); @Override CombinedCurve withParameter(int parameterIndex, double newValue); @Override CombinedCurve withPerturbation(ParameterPerturbation perturbation); @Override double yValue(double x); @Override UnitParameterSensitivity yValueParameterSensitivity(double x); @Override double firstDerivative(double x); @Override UnitParameterSensitivity createParameterSensitivity(DoubleArray sensitivities); @Override CurrencyParameterSensitivity createParameterSensitivity(Currency currency, DoubleArray sensitivities); @Override ImmutableList<Curve> split(); @Override CombinedCurve withUnderlyingCurve(int curveIndex, Curve curve); static CombinedCurve.Meta meta(); @Override CombinedCurve.Meta metaBean(); Curve getBaseCurve(); Curve getSpreadCurve(); @Override CurveMetadata getMetadata(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_yValue() { for (int i = 0; i < NUM_SAMPLES; ++i) { double computed = COMBINED_CURVE.yValue(X_SAMPLES.get(i)); double expected = BASE_CURVE.yValue(X_SAMPLES.get(i)) + SPREAD_CURVE.yValue(X_SAMPLES.get(i)); assertThat(computed).isCloseTo(expected, offset(TOL)); } }