### Question:
IborFutureOptionTradeCalculationFunction implements CalculationFunction<T> { @Override public Map<Measure, Result<?>> calculate( T target, Set<Measure> measures, CalculationParameters parameters, ScenarioMarketData scenarioMarketData, ReferenceData refData) { ResolvedIborFutureOptionTrade resolved = target.resolve(refData); RatesMarketDataLookup ratesLookup = parameters.getParameter(RatesMarketDataLookup.class); RatesScenarioMarketData ratesMarketData = ratesLookup.marketDataView(scenarioMarketData); IborFutureOptionMarketDataLookup optionLookup = parameters.getParameter(IborFutureOptionMarketDataLookup.class); IborFutureOptionScenarioMarketData optionMarketData = optionLookup.marketDataView(scenarioMarketData); Map<Measure, Result<?>> results = new HashMap<>(); for (Measure measure : measures) { results.put(measure, calculate(measure, resolved, ratesMarketData, optionMarketData)); } return results; } private  IborFutureOptionTradeCalculationFunction(Class<T> targetType); @Override Class<T> targetType(); @Override Set<Measure> supportedMeasures(); @Override Optional<String> identifier(T target); @Override Currency naturalCurrency(T target, ReferenceData refData); @Override FunctionRequirements requirements(
      T target,
      Set<Measure> measures,
      CalculationParameters parameters,
      ReferenceData refData); @Override Map<Measure, Result<?>> calculate(
      T target,
      Set<Measure> measures,
      CalculationParameters parameters,
      ScenarioMarketData scenarioMarketData,
      ReferenceData refData); static final IborFutureOptionTradeCalculationFunction<IborFutureOptionTrade> TRADE; static final IborFutureOptionTradeCalculationFunction<IborFutureOptionPosition> POSITION; }### Answer:
@Test public void test_simpleMeasures() { IborFutureOptionTradeCalculationFunction<IborFutureOptionTrade> function = IborFutureOptionTradeCalculationFunction.TRADE; ScenarioMarketData md = marketData(); RatesProvider provider = RATES_LOOKUP.ratesProvider(md.scenario(0)); NormalIborFutureOptionMarginedTradePricer pricer = NormalIborFutureOptionMarginedTradePricer.DEFAULT; ResolvedIborFutureOptionTrade resolved = TRADE.resolve(REF_DATA); CurrencyAmount expectedPv = pricer.presentValue(resolved, provider, VOL_SIMPLE_MONEY_PRICE, SETTLEMENT_PRICE); Set<Measure> measures = ImmutableSet.of(Measures.PRESENT_VALUE, Measures.RESOLVED_TARGET); assertThat(function.calculate(TRADE, measures, PARAMS, md, REF_DATA)) .containsEntry( Measures.PRESENT_VALUE, Result.success(CurrencyScenarioArray.of(ImmutableList.of(expectedPv)))) .containsEntry( Measures.RESOLVED_TARGET, Result.success(resolved)); }