### Question:
TimeInterval { public static TimeInterval between(Instant start, Instant end) { return new TimeInterval(start, end); } private  TimeInterval(Instant start, Instant end); boolean contains(Instant instant); static TimeInterval between(Instant start, Instant end); TimeInterval minus(Duration duration); static TimeInterval around(Duration duration, Instant reference); static TimeInterval after(Duration duration, Instant reference); static TimeInterval before(Duration duration, Instant reference); Instant getStart(); Instant getEnd(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void equals1() { TimeInterval interval = TimeInterval.between(Instant.ofEpochSecond(0, 0), Instant.ofEpochSecond(3600, 0)); assertThat(interval, equalTo(TimeInterval.between(Instant.ofEpochSecond(0, 0), Instant.ofEpochSecond(3600, 0)))); }
@Test public void equals2() { TimeInterval interval = TimeInterval.between(Instant.ofEpochSecond(0, 1), Instant.ofEpochSecond(3600, 0)); assertThat(interval, not(equalTo(TimeInterval.between(Instant.ofEpochSecond(0, 0), Instant.ofEpochSecond(3600, 0))))); }
@Test public void equals3() { TimeInterval interval = TimeInterval.between(Instant.ofEpochSecond(0, 0), Instant.ofEpochSecond(3600, 1)); assertThat(interval, not(equalTo(TimeInterval.between(Instant.ofEpochSecond(0, 0), Instant.ofEpochSecond(3600, 0))))); }
@Test public void equals4() { TimeInterval interval = TimeInterval.between(Instant.ofEpochSecond(0, 0), null); assertThat(interval, equalTo(TimeInterval.between(Instant.ofEpochSecond(0, 0), null))); }
@Test public void equals5() { TimeInterval interval = TimeInterval.between(null, Instant.ofEpochSecond(0, 0)); assertThat(interval, equalTo(TimeInterval.between(null, Instant.ofEpochSecond(0, 0)))); }