/** Tests the present value method for bond futures transactions. */
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);
}