ForwardRateAgreementDefinition extends CouponFloatingDefinition { public static ForwardRateAgreementDefinition from(final CouponDefinition coupon, final ZonedDateTime fixingDate, final IborIndex index, final double rate, final Calendar calendar) { ArgumentChecker.notNull(coupon, "coupon"); ArgumentChecker.notNull(fixingDate, "fixing date"); ArgumentChecker.notNull(index, "index"); return new ForwardRateAgreementDefinition(index.getCurrency(), coupon.getPaymentDate(), coupon.getAccrualStartDate(), coupon.getAccrualEndDate(), coupon.getPaymentYearFraction(), coupon.getNotional(), fixingDate, index, rate, calendar); } ForwardRateAgreementDefinition(final Currency currency, final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate,
      final ZonedDateTime accrualEndDate, final double accrualFactor, final double notional, final ZonedDateTime fixingDate, final IborIndex index, final double rate,
      final Calendar calendar);  ForwardRateAgreementDefinition(final Currency currency, final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate,
      final ZonedDateTime accrualEndDate, final double accrualFactor, final double notional, final ZonedDateTime fixingDate,
      final ZonedDateTime fixingPeriodStartDate, final ZonedDateTime fixingPeriodEndDate, final IborIndex index, final double rate,
      final Calendar calendar); static ForwardRateAgreementDefinition from(final CouponDefinition coupon, final ZonedDateTime fixingDate, final IborIndex index, final double rate,
      final Calendar calendar); static ForwardRateAgreementDefinition fromTrade(final ZonedDateTime tradeDate, final Period startPeriod, final double notional, final IborIndex index,
      final double rate, final Calendar calendar); static ForwardRateAgreementDefinition from(final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate, final double notional,
      final IborIndex index, final double rate, final Calendar calendar); static ForwardRateAgreementDefinition from(final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate, final double notional,
      final IborIndex index, final double rate, final Calendar fixingCalendar, final Calendar paymentCalendar); static ForwardRateAgreementDefinition from(final ZonedDateTime accrualStartDate, 
      final ZonedDateTime accrualEndDate, final double notional, final ZonedDateTime fixingDate, final IborIndex index, 
      final double rate, final Calendar fixingCalendar, final Calendar paymentCalendar); IborIndex getIndex(); ZonedDateTime getFixingPeriodStartDate(); ZonedDateTime getFixingPeriodEndDate(); double getFixingPeriodAccrualFactor(); double getRate(); @Override V accept(final InstrumentDefinitionVisitor<U, V> visitor, final U data); @Override V accept(final InstrumentDefinitionVisitor<?, V> visitor); @Override Payment toDerivative(final ZonedDateTime date); @Override Payment toDerivative(final ZonedDateTime date, final DoubleTimeSeries<ZonedDateTime> indexFixingTimeSeries); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }
@Test public void testPaymentCalendar() { ForwardRateAgreementDefinition def = ForwardRateAgreementDefinition.from(DateUtils.getUTCDate(2014, 4, 18), DateUtils.getUTCDate(2014, 10, 18), NOTIONAL, INDEX, FRA_RATE, CALENDAR, PAY_CALENDAR); assertTrue(CALENDAR.isWorkingDay(DateUtils.getUTCDate(2014, 4, 18).toLocalDate())); assertTrue(PAY_CALENDAR.isWorkingDay(def.getPaymentDate().toLocalDate())); assertEquals(DateUtils.getUTCDate(2014, 4, 22), def.getPaymentDate()); }