ActualThreeSixtyFiveLong extends ActualTypeDayCount { @Override public double getAccruedInterest(final ZonedDateTime previousCouponDate, final ZonedDateTime date, final ZonedDateTime nextCouponDate, final double coupon, final double paymentsPerYear) { Validate.notNull(previousCouponDate); Validate.notNull(date); Validate.notNull(nextCouponDate); return getAccruedInterest(previousCouponDate.toLocalDate(), date.toLocalDate(), nextCouponDate.toLocalDate(), coupon, paymentsPerYear); }  @Override double getDayCountFraction(final LocalDate firstDate, final LocalDate secondDate); @Override double getAccruedInterest(final ZonedDateTime previousCouponDate, final ZonedDateTime date, final ZonedDateTime nextCouponDate, final double coupon, final double paymentsPerYear); @Override double getAccruedInterest(final LocalDate previousCouponDate, final LocalDate date, final LocalDate nextCouponDate, final double coupon, final double paymentsPerYear); @Override String getName();  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullFirstDate() { DC.getAccruedInterest(null, D2, D3, COUPON, PAYMENTS); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullSecondDate() { DC.getAccruedInterest(D1, null, D3, COUPON, PAYMENTS); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullThirdDate() { DC.getAccruedInterest(D1, D2, null, COUPON, PAYMENTS); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testWrongOrder1() { DC.getAccruedInterest(D2, D1, D3, COUPON, PAYMENTS); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testWrongOrder2() { DC.getAccruedInterest(D1, D3, D2, COUPON, PAYMENTS); }
@Test public void testNoAccruedInterest() { assertEquals(DC.getAccruedInterest(D1, D1, D3, COUPON, PAYMENTS), 0, 0); }