CouponFixedFxResetDefinition extends CouponDefinition implements InstrumentDefinitionWithData<Payment, DoubleTimeSeries<ZonedDateTime>> { public double paymentAmount(double fxRate) { return getNotional() * fxRate * _rate * getPaymentYearFraction(); } CouponFixedFxResetDefinition(Currency currency, ZonedDateTime paymentDate, ZonedDateTime accrualStartDate, 
      ZonedDateTime accrualEndDate, double paymentAccrualFactor, double notional,
      double rate, Currency referenceCurrency, ZonedDateTime fxFixingDate, ZonedDateTime fxDeliveryDate); double getRate(); Currency getReferenceCurrency(); ZonedDateTime getFxFixingDate(); ZonedDateTime getFxDeliveryDate(); double paymentAmount(double fxRate); @Override CouponFixedFxReset toDerivative(ZonedDateTime dateTime); @Override Coupon toDerivative(ZonedDateTime dateTime, DoubleTimeSeries<ZonedDateTime> fxFixingHts); @Override V accept(InstrumentDefinitionVisitor<U, V> visitor, U data); @Override V accept(InstrumentDefinitionVisitor<?, V> visitor); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void paymentAmount() { double amountExpected = NOTIONAL * FX_FIXING_RATE * RATE * ACCRUAL_FACTOR; double amountComputed = CPN.paymentAmount(FX_FIXING_RATE); assertEquals("CouponFixedFxResetDefinition: paymentAmount", amountExpected, amountComputed, TOLERANCE_AMOUNT); }