@Test
/**
* Tests the TodayPaymentCalculator for forex transactions.
*/
public void forexTodayPaymentOnNearDate() {
final InstrumentDerivative fx = FX_SWAP_DEFINITION.toDerivative(NEAR_DATE, CURVES_NAME);
final MultipleCurrencyAmount cash = fx.accept(TPC);
assertEquals("TodayPaymentCalculator: forex", FX_SWAP_DEFINITION.getNearLeg().getPaymentCurrency1().getReferenceAmount(), cash.getAmount(FX_SWAP_DEFINITION.getNearLeg().getCurrency1()),
TOLERANCE_PV);
assertEquals("TodayPaymentCalculator: forex", FX_SWAP_DEFINITION.getNearLeg().getPaymentCurrency2().getReferenceAmount(), cash.getAmount(FX_SWAP_DEFINITION.getNearLeg().getCurrency2()),
TOLERANCE_PV);
assertEquals("TodayPaymentCalculator: forex", 2, cash.getCurrencyAmounts().length);