PresentRef extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; PresentRef that = (PresentRef) o; return Objects.equals(time, that.time); } PresentRef(Slot slot, LocalDateTime time); LocalDateTime getTime(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals() { PresentRef Time1 = new PresentRef(mockSlot, mockTime1); PresentRef Time2 = new PresentRef(mockSlot, mockTime1); assertEquals(Time1, Time2); assertEquals(Time1.getTime(), Time2.getTime()); assertEquals(Time1.getSlot(), Time2.getSlot()); assertEquals(Time1.hashCode(), Time2.hashCode()); assertEquals(Time1.toString(), Time2.toString()); }