### Question:
SimplePriceIndexValues implements PriceIndexValues, ImmutableBean, Serializable { @Override public double value(PriceIndexObservation observation) { YearMonth fixingMonth = observation.getFixingMonth(); if (fixingMonth.isBefore(YearMonth.from(valuationDate))) { OptionalDouble fixing = fixings.get(fixingMonth.atEndOfMonth()); if (fixing.isPresent()) { return fixing.getAsDouble(); } } double nbMonth = numberOfMonths(fixingMonth); return curve.yValue(nbMonth); } @ImmutableConstructor private  SimplePriceIndexValues(
      PriceIndex index,
      LocalDate valuationDate,
      NodalCurve curve,
      LocalDateDoubleTimeSeries fixings); static SimplePriceIndexValues of(
      PriceIndex index,
      LocalDate valuationDate,
      NodalCurve curve,
      LocalDateDoubleTimeSeries fixings); @Override Optional<T> findData(MarketDataName<T> name); @Override int getParameterCount(); @Override double getParameter(int parameterIndex); @Override ParameterMetadata getParameterMetadata(int parameterIndex); @Override OptionalInt findParameterIndex(ParameterMetadata metadata); @Override SimplePriceIndexValues withParameter(int parameterIndex, double newValue); @Override SimplePriceIndexValues withPerturbation(ParameterPerturbation perturbation); @Override double value(PriceIndexObservation observation); @Override PointSensitivityBuilder valuePointSensitivity(PriceIndexObservation observation); @Override CurrencyParameterSensitivities parameterSensitivity(InflationRateSensitivity pointSensitivity); @Override CurrencyParameterSensitivities createParameterSensitivity(Currency currency, DoubleArray sensitivities); SimplePriceIndexValues withCurve(NodalCurve curve); static SimplePriceIndexValues.Meta meta(); @Override SimplePriceIndexValues.Meta metaBean(); @Override PriceIndex getIndex(); @Override LocalDate getValuationDate(); NodalCurve getCurve(); @Override LocalDateDoubleTimeSeries getFixings(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_value() { for (int i = 0; i < TEST_MONTHS.length; i++) { double valueComputed = INSTANCE.value(TEST_OBS[i]); YearMonth fixingMonth = TEST_OBS[i].getFixingMonth(); double valueExpected; if (USCPI_TS.containsDate(fixingMonth.atEndOfMonth())) { valueExpected = USCPI_TS.get(fixingMonth.atEndOfMonth()).getAsDouble(); } else { double x = YearMonth.from(VAL_DATE).until(fixingMonth, MONTHS); valueExpected = CURVE_INFL.yValue(x); } assertThat(valueComputed).as("test " + i).isCloseTo(valueExpected, offset(TOLERANCE_VALUE)); } }
@Test public void test_value_futfixing() { for (int i = 0; i < TEST_MONTHS.length; i++) { double valueComputed = INSTANCE_WITH_FUTFIXING.value(TEST_OBS[i]); YearMonth fixingMonth = TEST_OBS[i].getFixingMonth(); double valueExpected; if (fixingMonth.isBefore(YearMonth.from(VAL_DATE_2)) && USCPI_TS.containsDate(fixingMonth.atEndOfMonth())) { valueExpected = USCPI_TS.get(fixingMonth.atEndOfMonth()).getAsDouble(); } else { double x = YearMonth.from(VAL_DATE_2).until(fixingMonth, MONTHS); valueExpected = CURVE_INFL2.yValue(x); } assertThat(valueComputed).as("test " + i).isCloseTo(valueExpected, offset(TOLERANCE_VALUE)); } }