assertEquals(FIXED_COUPON.getAmount(), RATE * NOTIONAL * ACCRUAL_FACTOR, 1E-10);
}
@Test
public void fromGeneratorDeposit() {
final GeneratorDeposit generator = new USDDeposit(CALENDAR);
final Period tenor = Period.ofMonths(3);
final CouponFixedDefinition cpnFixed = CouponFixedDefinition.from(ACCRUAL_START_DATE, tenor, generator, NOTIONAL, RATE);
final ZonedDateTime endDate = ScheduleCalculator.getAdjustedDate(ACCRUAL_START_DATE, tenor, generator.getBusinessDayConvention(), CALENDAR, generator.isEndOfMonth());
final double accrual = generator.getDayCount().getDayCountFraction(ACCRUAL_START_DATE, endDate);
final CouponFixedDefinition cpnExpected = new CouponFixedDefinition(generator.getCurrency(), endDate, ACCRUAL_START_DATE, endDate, accrual, NOTIONAL, RATE);
assertEquals("CouponFixedDefinition: from deposit generator", cpnExpected, cpnFixed);
}