BondFuturesTransactionDiscountingMethod extends FuturesTransactionIssuerMethod { public MultipleCurrencyAmount presentValueFromNetBasis(final BondFuturesTransaction futures, final IssuerProviderInterface issuerMulticurves, final double netBasis) { return presentValueFromPrice(futures, METHOD_FUTURES_SEC.priceFromNetBasis(futures.getUnderlyingSecurity(), issuerMulticurves, netBasis)); } private  BondFuturesTransactionDiscountingMethod(); static BondFuturesTransactionDiscountingMethod getInstance(); MultipleCurrencyAmount presentValueFromNetBasis(final BondFuturesTransaction futures, final IssuerProviderInterface issuerMulticurves, final double netBasis);  }
@Test public void presentValueFromNetBasis() { final double netBasisInput = 0.0001; final MultipleCurrencyAmount pvComputed = METHOD_FUT_TRA_DSC.presentValueFromNetBasis(BOND_FUTURES_TRA, ISSUER_MULTICURVES, netBasisInput); final double priceComputed = METHOD_FUT_SEC_DSC.priceFromNetBasis(BOND_FUTURES_SEC, ISSUER_MULTICURVES, netBasisInput); final MultipleCurrencyAmount pvExpected = METHOD_FUT_TRA_DSC.presentValueFromPrice(BOND_FUTURES_TRA, priceComputed); assertEquals("Bond future Discounting Method: present value from net basis", pvExpected.getAmount(USD), pvComputed.getAmount(USD), TOLERANCE_PV); }