### Question:
TermDeposit implements Product, Resolvable<ResolvedTermDeposit>, ImmutableBean, Serializable { public static TermDeposit.Builder builder() { return new TermDeposit.Builder(); } private  TermDeposit(
      BuySell buySell,
      Currency currency,
      double notional,
      LocalDate startDate,
      LocalDate endDate,
      BusinessDayAdjustment businessDayAdjustment,
      DayCount dayCount,
      double rate); @Override ImmutableSet<Currency> allCurrencies(); @Override ResolvedTermDeposit resolve(ReferenceData refData); static TermDeposit.Meta meta(); static TermDeposit.Builder builder(); @Override TermDeposit.Meta metaBean(); BuySell getBuySell(); Currency getCurrency(); double getNotional(); LocalDate getStartDate(); LocalDate getEndDate(); Optional<BusinessDayAdjustment> getBusinessDayAdjustment(); DayCount getDayCount(); double getRate(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_builder_wrongDates() { assertThatIllegalArgumentException() .isThrownBy(() -> TermDeposit.builder() .buySell(SELL) .startDate(START_DATE) .endDate(LocalDate.of(2014, 10, 19)) .businessDayAdjustment(BDA_MOD_FOLLOW) .dayCount(ACT_365F) .notional(NOTIONAL) .currency(EUR) .rate(RATE) .build()); }
@Test public void coverage() { TermDeposit test1 = TermDeposit.builder() .buySell(SELL) .startDate(START_DATE) .endDate(END_DATE) .businessDayAdjustment(BDA_MOD_FOLLOW) .dayCount(ACT_365F) .notional(NOTIONAL) .currency(GBP) .rate(RATE) .build(); coverImmutableBean(test1); TermDeposit test2 = TermDeposit.builder() .buySell(BuySell.BUY) .startDate(LocalDate.of(2015, 1, 21)) .endDate(LocalDate.of(2015, 7, 21)) .dayCount(ACT_360) .notional(NOTIONAL) .currency(EUR) .rate(RATE) .build(); coverBeanEquals(test1, test2); }
@Test public void test_serialization() { TermDeposit test = TermDeposit.builder() .buySell(SELL) .startDate(START_DATE) .endDate(END_DATE) .businessDayAdjustment(BDA_MOD_FOLLOW) .dayCount(ACT_365F) .notional(NOTIONAL) .currency(GBP) .rate(RATE) .build(); assertSerialization(test); }