### Question:
ComplexSchemaType extends SchemaType { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ComplexSchemaType)) { return false; } if (!super.equals(objectToCompare)) { return false; } ComplexSchemaType that = (ComplexSchemaType) objectToCompare; return Objects.equals(getAttributeCount(), that.getAttributeCount()); } ComplexSchemaType();  ComplexSchemaType(ComplexSchemaType template); int getAttributeCount(); void setAttributeCount(int attributeCount); @Override SchemaElement cloneSchemaElement(); @Override SchemaType cloneSchemaType(); @Override String toString(); @Override boolean equals(Object objectToCompare);  }### Answer:
@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); ComplexSchemaType sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); ComplexSchemaType differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); }