final double[] fixingPeriodEndTimesLeft = new double[NB_SUB_PERIOD - 1];
System.arraycopy(TimeCalculator.getTimeBetween(referenceDate, FIXING_PERIOD_END_DATES), 1, fixingPeriodEndTimesLeft, 0, NB_SUB_PERIOD - 1);
final double[] fixingPeriodAccrualFactorsLeft = new double[NB_SUB_PERIOD - 1];
System.arraycopy(FIXING_ACCRUAL_FACTORS, 1, fixingPeriodAccrualFactorsLeft, 0, NB_SUB_PERIOD - 1);
final Coupon cpnConverted = CPN_FROM_INDEX_DEFINITION.toDerivative(referenceDate, FIXING_TS);
final CouponIborCompoundingFlatSpread cpnExpected = new CouponIborCompoundingFlatSpread(USDLIBOR1M.getCurrency(), paymentTime, PAYMENT_ACCRUAL_FACTOR, NOTIONAL, cpaAccumulated, USDLIBOR1M,
paymentAccrualFactorsLeft, fixingTimesLeft, fixingPeriodStartTimesLeft, fixingPeriodEndTimesLeft, fixingPeriodAccrualFactorsLeft, SPREAD);
assertEquals("CouponIborCompoundingFlatSpreadDefinition: toDerivative", cpnExpected, cpnConverted);
}