### Question:
DiscountingIborFutureProductPricer { double marginIndex(ResolvedIborFuture future, double price) { return price * future.getNotional() * future.getAccrualFactor(); } DiscountingIborFutureProductPricer(); double price(ResolvedIborFuture future, RatesProvider ratesProvider); PointSensitivities priceSensitivity(ResolvedIborFuture future, RatesProvider ratesProvider); static final DiscountingIborFutureProductPricer DEFAULT; }### Answer:
@Test public void test_marginIndex() { double notional = FUTURE.getNotional(); double accrualFactor = FUTURE.getAccrualFactor(); double price = 0.99; double marginIndexExpected = price * notional * accrualFactor; double marginIndexComputed = PRICER.marginIndex(FUTURE, price); assertThat(marginIndexComputed).isEqualTo(marginIndexExpected); }