CouponFixedCompoundingDefinition extends CouponDefinition { public static CouponFixedCompoundingDefinition from(final Currency currency, final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate, final double paymentAccrualFactor, final double notional, final double rate, final ZonedDateTime[] accrualStartDates, final ZonedDateTime[] accrualEndDates, final double[] paymentAccrualFactors) { return new CouponFixedCompoundingDefinition(currency, paymentDate, accrualStartDate, accrualEndDate, paymentAccrualFactor, notional, rate, accrualStartDates, accrualEndDates, paymentAccrualFactors); } private  CouponFixedCompoundingDefinition(final Currency currency, final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate,
      final double paymentAccrualFactor, final double notional, final double rate, final ZonedDateTime[] accrualStartDates, final ZonedDateTime[] accrualEndDates,
      final double[] paymentAccrualFactors); static CouponFixedCompoundingDefinition from(final Currency currency, final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate,
      final double paymentAccrualFactor, final double notional, final double rate, final ZonedDateTime[] accrualStartDates, final ZonedDateTime[] accrualEndDates,
      final double[] paymentAccrualFactors); static CouponFixedCompoundingDefinition from(final Currency currency, final ZonedDateTime paymentDate, final ZonedDateTime[] accrualStartDates,
      final ZonedDateTime[] accrualEndDates, final double[] paymentAccrualFactors, final double notional, final double rate); static CouponFixedCompoundingDefinition from(final Currency currency, final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate, final double notional,
      final Period tenorPeriod, final double rate); static CouponFixedCompoundingDefinition from(final Currency currency, final ZonedDateTime accrualStartDate, final ZonedDateTime paymentDate, final double notional,
      final int tenor, final double rate); double getRate(); ZonedDateTime[] getAccrualStartDates(); ZonedDateTime[] getAccrualEndDates(); double[] getPaymentAccrualFactors(); @Override String toString(); @Override CouponFixedCompounding toDerivative(final ZonedDateTime date); @Override V accept(final InstrumentDefinitionVisitor<U, V> visitor, final U data); @Override V accept(final InstrumentDefinitionVisitor<?, V> visitor); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void nullCurrency() { CouponFixedCompoundingDefinition.from(null, PAYMENT_DATE, ACCRUAL_START_DATES[0], ACCRUAL_END_DATES[NB_SUB_PERIOD - 1], PAYMENT_ACCRUAL_FACTOR, NOTIONAL, FIXED_RATE, ACCRUAL_START_DATES, ACCRUAL_END_DATES, PAYMENT_ACCRUAL_FACTORS); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullPaymentDate() { CouponFixedCompoundingDefinition.from(CURRENCY, null, ACCRUAL_START_DATES[0], ACCRUAL_END_DATES[NB_SUB_PERIOD - 1], PAYMENT_ACCRUAL_FACTOR, NOTIONAL, FIXED_RATE, ACCRUAL_START_DATES, ACCRUAL_END_DATES, PAYMENT_ACCRUAL_FACTORS); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNegativePaymentAccrualFactor() { CouponFixedCompoundingDefinition.from(CURRENCY, PAYMENT_DATE, ACCRUAL_START_DATES[0], ACCRUAL_END_DATES[NB_SUB_PERIOD - 1], -PAYMENT_ACCRUAL_FACTOR, NOTIONAL, FIXED_RATE, ACCRUAL_START_DATES, ACCRUAL_END_DATES, PAYMENT_ACCRUAL_FACTORS); }