### Question:
TimeRange implements Comparable<TimeRange> { @Override public boolean equals(Object o) { if (o instanceof TimeRange) { TimeRange tr = (TimeRange)o; if (this.begin == tr.getBegin()) { return true; } } return false; } TimeRange();  TimeRange(long begin, long end); void set(long begin, long end); long getBegin(); long getEnd(); @Override int compareTo(TimeRange o); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEquals() { assertTrue(test1.equals(test1)); assertFalse(test1.equals(100)); }