final DoubleTimeSeries<ZonedDateTime> fixingTS = ImmutableZonedDateTimeDoubleTimeSeries.ofUTC(new ZonedDateTime[] {DateUtils.getUTCDate(2011, 9, 7), DateUtils.getUTCDate(2011, 9, 8) },
new double[] {0.01, 0.01 });
final Payment cpnConverted = FEDFUND_CPN_3M_DEF.toDerivative(referenceDate, fixingTS);
final double paymentTime = TimeCalculator.getTimeBetween(referenceDate, PAYMENT_DATE_3M);
final double[] fixingPeriodTimes = TimeCalculator.getTimeBetween(referenceDate, FEDFUND_CPN_3M_DEF.getFixingPeriodDates());
final CouponArithmeticAverageONSpread cpnExpected = CouponArithmeticAverageONSpread.from(paymentTime, ACCURAL_FACTOR_3M, NOTIONAL, FEDFUND, fixingPeriodTimes,
FEDFUND_CPN_3M_DEF.getFixingPeriodAccrualFactors(), 0.0, SPREAD);
assertEquals("CouponArithmeticAverageONSpread definition definition: toDerivative", cpnExpected, cpnConverted);
}