### Question:
ClassificationDef extends TypeDef { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ClassificationDef)) { return false; } if (!super.equals(objectToCompare)) { return false; } ClassificationDef that = (ClassificationDef) objectToCompare; return isPropagatable() == that.isPropagatable() && Objects.equals(getValidEntityDefs(), that.getValidEntityDefs()); } ClassificationDef();  ClassificationDef(TypeDefCategory category,
                             String          guid,
                             String          name,
                             long            version,
                             String          versionName);  ClassificationDef(ClassificationDef   template); TypeDef cloneFromSubclass(); List<TypeDefLink> getValidEntityDefs(); void setValidEntityDefs(List<TypeDefLink> validEntityDefs); boolean isPropagatable(); void setPropagatable(boolean propagatable); @Override String toString(); @Override boolean equals(Object objectToCompare);  }### Answer:
@Test public void testEquals() { assertTrue(getTestObject().equals(getTestObject())); ClassificationDef testObject = getTestObject(); assertTrue(testObject.equals(testObject)); assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("A String")); ClassificationDef differentObject = new ClassificationDef(TypeDefCategory.ENTITY_DEF, guid, name, 0 , "1.0"); assertFalse(testObject.equals(differentObject)); differentObject = getTestObject(); differentObject.setVersionName("DifferentHomeId"); assertFalse(testObject.equals(differentObject)); }