@Test public void testEquals() { SpecificDate date1 = new SpecificDate(mockSlot, mockDate1); SpecificDate date2 = new SpecificDate(mockSlot, mockDate1); assertEquals(date1, date2); assertEquals(date1.getDate(), date2.getDate()); assertEquals(date1.getSlot(), date2.getSlot()); assertEquals(date1.hashCode(), date2.hashCode()); assertEquals(date1.toString(), date2.toString()); }
@Override public boolean equals(Object o) { if (!super.equals(o)) return false; SpecificDate that = (SpecificDate) o; return Objects.equals(date, that.date); }
SpecificDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; SpecificDate that = (SpecificDate) o; return Objects.equals(date, that.date); } }
SpecificDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; SpecificDate that = (SpecificDate) o; return Objects.equals(date, that.date); } SpecificDate(Slot slot, LocalDate date); }
SpecificDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; SpecificDate that = (SpecificDate) o; return Objects.equals(date, that.date); } SpecificDate(Slot slot, LocalDate date); LocalDate getDate(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
SpecificDate extends AmazonDate { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; SpecificDate that = (SpecificDate) o; return Objects.equals(date, that.date); } SpecificDate(Slot slot, LocalDate date); LocalDate getDate(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }