### Question:
Period implements Comparable<Period> { boolean containsDate(final LocalDate date) { return this.getBeginDate().compareTo(date) <= 0 && this.getEndDate().compareTo(date) > 0; } Period(final LocalDate beginDate, final LocalDate endDateExclusive);  Period(final LocalDate beginDate, final LocalDate endDateExclusive, final boolean lastPeriod);  Period(final LocalDate beginDate, final int periodLength);  Period(final int periodLength, final LocalDate endDate); LocalDate getBeginDate(); LocalDate getEndDate(); boolean isLastPeriod(); Duration getDuration(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(@Nonnull Period o); @Override String toString();  }### Answer:
@Test public void containsDate() throws Exception { final Period testSubject = new Period(today, 1); Assert.assertTrue(testSubject.containsDate(today)); Assert.assertFalse(testSubject.containsDate(tommorrow)); Assert.assertFalse(testSubject.containsDate(yesterday)); Assert.assertFalse(testSubject.containsDate(dayAfterTommorrow)); }