### Question:
RatesCurveGroupMarketDataFunction implements MarketDataFunction<RatesCurveGroup, RatesCurveGroupId> { @Override public MarketDataRequirements requirements(RatesCurveGroupId id, MarketDataConfig marketDataConfig) { RatesCurveGroupDefinition groupDefn = marketDataConfig.get(RatesCurveGroupDefinition.class, id.getCurveGroupName()); List<RatesCurveInputsId> curveInputsIds = groupDefn.getCurveDefinitions().stream() .filter(defn -> requiresMarketData(defn)) .map(defn -> defn.getName()) .map(curveName -> RatesCurveInputsId.of(groupDefn.getName(), curveName, id.getObservableSource())) .collect(toImmutableList()); List<ObservableId> timeSeriesIds = groupDefn.getEntries().stream() .flatMap(entry -> entry.getIndices().stream()) .distinct() .map(index -> IndexQuoteId.of(index)) .collect(toImmutableList()); return MarketDataRequirements.builder() .addValues(curveInputsIds) .addTimeSeries(timeSeriesIds) .build(); } RatesCurveGroupMarketDataFunction();  RatesCurveGroupMarketDataFunction(CalibrationMeasures calibrationMeasures); @Override MarketDataRequirements requirements(RatesCurveGroupId id, MarketDataConfig marketDataConfig); @Override MarketDataBox<RatesCurveGroup> build(
      RatesCurveGroupId id,
      MarketDataConfig marketDataConfig,
      ScenarioMarketData marketData,
      ReferenceData refData); @Override Class<RatesCurveGroupId> getMarketDataIdType();  }### Answer:
@Test public void requirements() { FraCurveNode node1x4 = CurveTestUtils.fraNode(1, "foo"); FraCurveNode node2x5 = CurveTestUtils.fraNode(2, "foo"); List<CurveNode> nodes = ImmutableList.of(node1x4, node2x5); CurveGroupName groupName = CurveGroupName.of("Curve Group"); CurveName curveName = CurveName.of("FRA Curve"); ObservableSource obsSource = ObservableSource.of("Vendor"); InterpolatedNodalCurveDefinition curveDefn = InterpolatedNodalCurveDefinition.builder() .name(curveName) .nodes(nodes) .interpolator(CurveInterpolators.DOUBLE_QUADRATIC) .extrapolatorLeft(CurveExtrapolators.FLAT) .extrapolatorRight(CurveExtrapolators.FLAT) .build(); RateIndex ibor = IborIndices.USD_LIBOR_3M; RatesCurveGroupDefinition groupDefn = RatesCurveGroupDefinition.builder() .name(groupName) .addCurve(curveDefn, Currency.USD, ibor) .build(); MarketDataConfig marketDataConfig = MarketDataConfig.builder() .add(groupName, groupDefn) .build(); RatesCurveGroupMarketDataFunction function = new RatesCurveGroupMarketDataFunction(); RatesCurveGroupId curveGroupId = RatesCurveGroupId.of(groupName, obsSource); MarketDataRequirements requirements = function.requirements(curveGroupId, marketDataConfig); assertThat(requirements.getNonObservables()).contains(RatesCurveInputsId.of(groupName, curveName, obsSource)); assertThat(requirements.getTimeSeries().contains(IndexQuoteId.of(ibor))); }