AbsoluteTime extends AmazonTime { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; AbsoluteTime that = (AbsoluteTime) o; return Objects.equals(time, that.time); } AbsoluteTime(Slot slot, LocalTime time); LocalTime getTime(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals() { AbsoluteTime left = new AbsoluteTime(mockSlot, LocalTime.MIDNIGHT); AbsoluteTime right = new AbsoluteTime(mockSlot, LocalTime.MIDNIGHT); assertEquals(left, right); assertEquals(left.getTime(), right.getTime()); assertEquals(left.getSlot(), right.getSlot()); assertEquals(left.hashCode(), right.hashCode()); assertEquals(left.toString(), right.toString()); }