### Question:
IMSTimePoint implements Comparable<IMSTimePoint> { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; IMSTimePoint other = (IMSTimePoint) obj; if (date == null) { if (other.date != null) return false; } else if (!date.equals(other.date)) return false; if (Integer.valueOf(hourIndex) == null) { if (Integer.valueOf(((IMSTimePoint) obj).hourIndex) != null) return false; } else if (!Integer.valueOf(hourIndex).equals(Integer.valueOf(((IMSTimePoint) obj).hourIndex))) return false; return true; } IMSTimePoint(long epochTime); String toString(); String getDate(); void setDate(String date); int getHourIndex(); void setHourIndex(int hourIndex); static IMSTimePoint incrementHour(IMSTimePoint imsTimePoint); static IMSTimePoint incrementDay(IMSTimePoint imsTimePoint); static List<IMSTimePoint> build(List<Range> ranges); @Override int hashCode(); @Override boolean equals(Object obj); static List<IMSTimePoint> appendListFromStartToEndHours(int start, int end, List<IMSTimePoint> imsTimePointList, Range elt); LocalDateTime getDateTime(); @Override int compareTo(IMSTimePoint o);  }### Answer:
@Test public void testEquals() { long epTime = Long.valueOf("1574641835000"); IMSTimePoint epochTime = new IMSTimePoint(epTime); assertEquals("2019-11-24", epochTime.getDate()); long epTime2 = Long.valueOf("1574645435000"); IMSTimePoint epochTime2 = new IMSTimePoint(epTime2); assertEquals("2019-11-24", epochTime2.getDate()); assertTrue(epochTime.equals(epochTime)); assertFalse(epochTime.equals(epochTime2)); assertFalse(new IMSTimePoint(0).equals(null)); IMSTimePoint epochTime3 = null; assertNull(epochTime3); epochTime3 = new IMSTimePoint(epTime); assertFalse(epochTime3.equals(null)); epochTime3.setDate(""); assertFalse(epochTime3.equals(null)); assertFalse(epochTime3.equals(new IMSTimePoint(0))); IMSTimePoint timePoint = new IMSTimePoint(123L); assertFalse(timePoint.equals(123L)); assertFalse(epochTime3.equals(null)); assertFalse(epochTime3.equals(null)); timePoint = new IMSTimePoint(0L); timePoint.setDate(null); IMSTimePoint tp = new IMSTimePoint(0L); tp.setDate("2018-11-07"); assertFalse(timePoint.equals(tp)); }