### Question:
DefaultInstant extends DefaultTemporalGeometricPrimitive implements Instant { @Override public boolean equals(Object object, ComparisonMode mode) { if (object == this) { return true; } if (object instanceof DefaultInstant) { final DefaultInstant that = (DefaultInstant) object; return Objects.equals(this.date, that.date) && Objects.equals(this.temporalPosition, that.temporalPosition); } return false; } DefaultInstant();  DefaultInstant(Map<String, ?> properties,  Date date);  DefaultInstant(final Map<String, ?> properties, final TemporalPosition temporalPosition); private  DefaultInstant(final Instant object); static DefaultInstant castOrCopy(final Instant object); @Override @XmlElement(name = "timePosition", required = true) Date getDate(); @Override TemporalPosition getTemporalPosition(); @Override boolean equals(Object object, ComparisonMode mode); @Override String toString();  }### Answer:
@Test public void testEquals() { cal.set(2000, 1, 1); assertFalse(instant1.equals(null)); assertEquals(cal.getTime().getTime(), instant1.getDate().getTime()); assertFalse(instant1.equals(instant2)); }