### Question:
NormalIborFutureOptionMarginedTradePricer { public PointSensitivities presentValueSensitivityRates( ResolvedIborFutureOptionTrade trade, RatesProvider ratesProvider, NormalIborFutureOptionVolatilities volatilities) { ResolvedIborFutureOption product = trade.getProduct(); PointSensitivities priceSensi = futureOptionPricer.priceSensitivityRatesStickyStrike(product, ratesProvider, volatilities); PointSensitivities marginIndexSensi = futureOptionPricer.marginIndexSensitivity(product, priceSensi); return marginIndexSensi.multipliedBy(trade.getQuantity()); } NormalIborFutureOptionMarginedTradePricer(
      NormalIborFutureOptionMarginedProductPricer futureOptionPricer); double price(
      ResolvedIborFutureOptionTrade trade,
      RatesProvider ratesProvider,
      NormalIborFutureOptionVolatilities volatilities); CurrencyAmount presentValue(
      ResolvedIborFutureOptionTrade trade,
      LocalDate valuationDate,
      double currentOptionPrice,
      double lastOptionSettlementPrice); CurrencyAmount presentValue(
      ResolvedIborFutureOptionTrade trade,
      RatesProvider ratesProvider,
      NormalIborFutureOptionVolatilities volatilities,
      double lastOptionSettlementPrice); CurrencyAmount presentValue(
      ResolvedIborFutureOptionTrade trade,
      RatesProvider ratesProvider,
      NormalIborFutureOptionVolatilities volatilities,
      double futurePrice,
      double lastOptionSettlementPrice); PointSensitivities presentValueSensitivityRates(
      ResolvedIborFutureOptionTrade trade,
      RatesProvider ratesProvider,
      NormalIborFutureOptionVolatilities volatilities); IborFutureOptionSensitivity presentValueSensitivityModelParamsVolatility(
      ResolvedIborFutureOptionTrade futureOptionTrade,
      RatesProvider ratesProvider,
      NormalIborFutureOptionVolatilities volatilities); IborFutureOptionSensitivity presentValueSensitivityModelParamsVolatility(
      ResolvedIborFutureOptionTrade futureOptionTrade,
      RatesProvider ratesProvider,
      NormalIborFutureOptionVolatilities volatilities,
      double futurePrice); static final NormalIborFutureOptionMarginedTradePricer DEFAULT; }### Answer:
@Test public void presentValueSensitivity_from_env() { IborIndexRates mockIbor = mock(IborIndexRates.class); SimpleRatesProvider prov = new SimpleRatesProvider(); prov.setIborRates(mockIbor); when(mockIbor.rate(OPTION.getUnderlyingFuture().getIborRate().getObservation())).thenReturn(RATE); PointSensitivities psProduct = OPTION_PRODUCT_PRICER.priceSensitivityRatesStickyStrike(OPTION, prov, VOL_SIMPLE_MONEY_PRICE); PointSensitivities psExpected = psProduct .multipliedBy(OPTION_PRODUCT_PRICER.marginIndex(OPTION, 1) * OPTION_QUANTITY); PointSensitivities psComputed = OPTION_TRADE_PRICER .presentValueSensitivityRates(FUTURE_OPTION_TRADE, prov, VOL_SIMPLE_MONEY_PRICE); assertThat(psComputed.equalWithTolerance(psExpected, TOLERANCE_PV_DELTA)).isTrue(); }