### Question:
DefaultPeriod extends DefaultTemporalGeometricPrimitive implements Period { @Override public boolean equals(final Object object, ComparisonMode comp) { if (object == this) { return true; } if (object instanceof DefaultPeriod) { final DefaultPeriod that = (DefaultPeriod) object; return Objects.equals(this.begining, that.begining) && Objects.equals(this.ending, that.ending); } return false; } private  DefaultPeriod();  DefaultPeriod(final Map<String , ?> properties, final Instant begining, final Instant ending); private  DefaultPeriod(final Period object); static DefaultPeriod castOrCopy(final Period object); @Override @XmlElement(name = "begin", required = true) Instant getBeginning(); void setBegining(final Instant begining); @Override @XmlElement(name = "end", required = true) Instant getEnding(); void setEnding(final Instant ending); @Override boolean equals(final Object object, ComparisonMode comp); @Override String toString();  }### Answer:
@Test public void testEquals() { assertFalse(period1.equals(null)); assertEquals(period1, period1); assertFalse(period1.equals(period2)); }