### Question:
DateRange implements Serializable, Comparable<DateRange> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof DateRange)) { return false; } DateRange other = (DateRange) o; return 0 == this.compareTo(other); } DateRange(@Nonnull LocalDate gueltigAb, @Nonnull LocalDate gueltigBis);  DateRange();  DateRange(@Nonnull LocalDate stichtag);  DateRange(@Nonnull DateRange gueltigkeit);  DateRange(@Nonnull Integer jahr); boolean contains(@Nonnull DateRange other); boolean contains(@Nonnull ChronoLocalDate date); boolean isBefore(@Nonnull ChronoLocalDate date); boolean isAfter(@Nonnull ChronoLocalDate date); boolean startsDayAfter(@Nonnull ChronoLocalDate date); boolean startsDayAfter(@Nonnull DateRange other); boolean startsBefore(@Nonnull DateRange other); boolean startsAfter(@Nonnull ChronoLocalDate date); boolean startsSameDay(@Nonnull DateRange other); boolean startsSameDay(@Nonnull ChronoLocalDate date); boolean endsAfter(@Nonnull DateRange other); boolean endsDayBefore(@Nonnull ChronoLocalDate date); boolean endsDayBefore(@Nonnull DateRange other); boolean endsBefore(@Nonnull DateRange other); boolean endsBefore(@Nonnull ChronoLocalDate date); boolean endsSameDay(@Nonnull DateRange other); boolean endsSameDay(@Nonnull ChronoLocalDate date); boolean isStichtag(); void endOnDayBefore(@Nonnull DateRange other); void startOnDayAfter(@Nonnull DateRange other); @Nonnull DateRange withFullWeeks(); @Nonnull List<DateRange> toFullWeekRanges(); @Nonnull DateRange withFullMonths(); @Nonnull DateRange withFullYears(); @Nonnull Optional<DateRange> getOverlap(@Nonnull DateRange otherRange); LocalDate calculateEndOfPreviousYear(); boolean intersects(@Nonnull DateRange other); long getDays(); @Nonnull LocalDate getGueltigAb(); void setGueltigAb(@Nonnull LocalDate gueltigAb); @Nonnull LocalDate getGueltigBis(); void setGueltigBis(@Nonnull LocalDate gueltigBis); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override @Nonnull String toString(); String toRangeString(); @Override int compareTo(@Nonnull DateRange o); @Nonnull Stream<LocalDate> stream(); @Nonnull Stream<LocalDate> streamStichtage();  }### Answer:
@Test public void testEquals() { assertEquals(year2015, new DateRange(year2015)); assertFalse(year2015.equals(new DateRange(LocalDate.of(2015, 1, 2), LocalDate.of(2015, 12, 31)))); assertFalse(year2015.equals(new DateRange(LocalDate.of(2015, 1, 1), LocalDate.of(2015, 12, 30)))); assertFalse(year2015.equals(new DateRange(LocalDate.of(2016, 1, 1), LocalDate.of(2016, 12, 31)))); }