### Question:
DefaultPeriod extends DefaultTemporalGeometricPrimitive implements Period { @Override public String toString() { StringBuilder s = new StringBuilder("Period:").append('\n'); if (begining != null) { s.append("begin:").append(begining).append('\n'); } if (ending != null) { s.append("end:").append(ending).append('\n'); } return s.toString(); } 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 testToString() { String result = period1.toString(); assertFalse(period2.toString().equals(result)); }