### Question:
MetaDataEditorFieldDefinition extends AbstractFieldDefinition { @Override protected void doCopyFrom(FieldDefinition other) { if (other instanceof MetaDataEditorFieldDefinition) { this.setDefaultValue(((MetaDataEditorFieldDefinition) other).getDefaultValue()); } } MetaDataEditorFieldDefinition(); @Override MetaDataEditorFieldType getFieldType(); String getDefaultValue(); void setDefaultValue(String defaultValue); @Override boolean equals(Object o); @Override int hashCode(); static final MetaDataEditorFieldType FIELD_TYPE; }### Answer:
@Test public void testDoCopyFromTest() { MetaDataEditorFieldDefinition def = new MetaDataEditorFieldDefinition(); MetaDataEditorFieldDefinition def2 = new MetaDataEditorFieldDefinition(); def.doCopyFrom(def2); assertEquals(def2, def); }
@Test public void testDoCopyFromTestFail() { MetaDataEditorFieldDefinition def = new MetaDataEditorFieldDefinition(); ImportsFieldDefinition def2 = new ImportsFieldDefinition(); def.doCopyFrom(def2); assertNotEquals(def2, def); }