### Question:
VariableDeclaration { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } VariableDeclaration that = (VariableDeclaration) o; return Objects.equals(identifier, that.identifier) && Objects.equals(type, that.type) && Objects.equals(tags, that.tags); } VariableDeclaration(String identifier, String type);  VariableDeclaration(String identifier, String type, String tags); static VariableDeclaration fromString(String encoded); String getTags(); void setTags(String tags); String getIdentifier(); void setIdentifier(String identifier); String getType(); void setType(String type); ItemDefinition getTypeDeclaration(); Property getTypedIdentifier(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testEquals() { VariableDeclaration comparable = new VariableDeclaration(CONSTRUCTOR_IDENTIFIER, CONSTRUCTOR_TYPE, CONSTRUCTOR_TAGS); assertEquals(tested, comparable); }
@Test public void testDataObjectEquals() { DataObject dataObject1 = mockDataObject("dataObject1"); DataObject dataObject2 = mockDataObject("dataObject2"); DataObjectImpl dataObject1Cast = (DataObjectImpl) dataObject1; DataObjectImpl dataObject2Cast = (DataObjectImpl) dataObject2; assertFalse(dataObject1Cast.equals(dataObject2Cast)); assertTrue(dataObject1Cast.equals(dataObject1Cast)); assertFalse(dataObject1Cast.equals("someString")); dataObject2 = mockDataObject("dataObject1"); dataObject2Cast = (DataObjectImpl) dataObject2; assertFalse(dataObject1Cast.equals(dataObject2Cast)); }