BondFutureHullWhiteMethod extends BondFutureMethod { public static BondFutureHullWhiteMethod getInstance() { return INSTANCE; } private  BondFutureHullWhiteMethod(); static BondFutureHullWhiteMethod getInstance(); double price(final BondFuture future, final HullWhiteIssuerProviderInterface data, final int nbPoint); double price(final BondFuture future, final HullWhiteIssuerProviderInterface data); MultipleCurrencyAmount presentValue(final BondFuture future, final HullWhiteIssuerProviderInterface data); MulticurveSensitivity priceCurveSensitivity(final BondFuture future, final HullWhiteIssuerProviderInterface data, final int nbPoint); MulticurveSensitivity priceCurveSensitivity(final BondFuture future, final HullWhiteIssuerProviderInterface data); MultipleCurrencyMulticurveSensitivity presentValueCurveSensitivity(final BondFuture future, final HullWhiteIssuerProviderInterface data);  }
@Test(enabled = true) public void presentValueFromPrice() { final double quotedPrice = 1.05; final MultipleCurrencyAmount presentValueMethod = METHOD_HW.presentValueFromPrice(BOND_FUTURE_DERIV, quotedPrice); assertEquals("Bond future transaction Method: present value from price", (quotedPrice - REF_PRICE) * NOTIONAL, presentValueMethod.getAmount(USD)); final PresentValueFromFuturePriceCalculator calculator = PresentValueFromFuturePriceCalculator.getInstance(); final double presentValueCalculator = BOND_FUTURE_DERIV.accept(calculator, quotedPrice); assertEquals("Bond future transaction Method: present value from price", presentValueMethod.getAmount(USD), presentValueCalculator); }