### Question:
DiscountingIborFutureTradePricer { public double price(ResolvedIborFutureTrade trade, RatesProvider ratesProvider) { return productPricer.price(trade.getProduct(), ratesProvider); } DiscountingIborFutureTradePricer(
      DiscountingIborFutureProductPricer productPricer); double price(ResolvedIborFutureTrade trade, RatesProvider ratesProvider); PointSensitivities priceSensitivity(ResolvedIborFutureTrade trade, RatesProvider ratesProvider); CurrencyAmount presentValue(ResolvedIborFutureTrade trade, RatesProvider ratesProvider, double lastSettlementPrice); PointSensitivities presentValueSensitivity(ResolvedIborFutureTrade trade, RatesProvider ratesProvider); double parSpread(ResolvedIborFutureTrade trade, RatesProvider ratesProvider, double lastSettlementPrice); PointSensitivities parSpreadSensitivity(ResolvedIborFutureTrade trade, RatesProvider ratesProvider); static final DiscountingIborFutureTradePricer DEFAULT; }### Answer:
@Test public void test_price() { IborIndexRates mockIbor = mock(IborIndexRates.class); SimpleRatesProvider prov = new SimpleRatesProvider(); prov.setIborRates(mockIbor); when(mockIbor.rate(FUTURE.getIborRate().getObservation())).thenReturn(RATE); assertThat(PRICER_TRADE.price(FUTURE_TRADE, prov)).isCloseTo(1.0 - RATE, offset(TOLERANCE_PRICE)); }