### Question:
DefaultCalendar extends DefaultTemporalReferenceSystem implements Calendar { @Override public boolean equals(Object object, ComparisonMode mode) { if (object instanceof Calendar) { final Calendar that = (Calendar) object; return Objects.equals(this.getName(), that.getName()) && Objects.equals(this.getDomainOfValidity(), that.getDomainOfValidity()) && Objects.equals(this.referenceFrame, that.getReferenceFrame()) &&Objects.equals(this.timeBasis, that.getTimeBasis()); } return false; } DefaultCalendar(Map<String, ?> properties,
                           Collection<CalendarEra> referenceFrame, Clock timeBasis ); private  DefaultCalendar(); private  DefaultCalendar(final Calendar object); static DefaultCalendar castOrCopy(final Calendar object); @Override JulianDate dateTrans(final CalendarDate calDate, final ClockTime time); JulianDate dateTrans(final DateAndTime dateAndTime); @Override CalendarDate julTrans(final JulianDate jdt); @Override boolean equals(Object object, ComparisonMode mode); @Override String toString(); @Override @XmlElement(name = "referenceFrame", required = true) Collection<CalendarEra> getReferenceFrame(); @Override Clock getTimeBasis();  }### Answer:
@Test public void testEquals() { assertFalse(calendar1.equals(null)); assertEquals(calendar1, calendar1); assertFalse(calendar1.equals(calendar2)); }