### Question:
JPADataObjectFieldEditor extends FieldEditor implements JPADataObjectFieldEditorView.Presenter { @Override protected void loadDataObjectField(DataObject dataObject, ObjectProperty objectField) { clear(); setReadonly(true); if (dataObject != null && objectField != null) { this.dataObject = dataObject; this.objectField = objectField; updateIdentifierField(objectField.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_ID_ANNOTATION)); updateColumnFields(objectField.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_COLUMN_ANNOTATION)); updateGeneratedValueField(objectField.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_GENERATED_VALUE_ANNOTATION)); updateSequenceGeneratorField(objectField.getAnnotation(JPADomainAnnotations.JAVAX_PERSISTENCE_SEQUENCE_GENERATOR_ANNOTATION)); updateRelationshipField(getCurrentRelationshipAnnotation(objectField)); setReadonly(getContext() == null || getContext().isReadonly()); } loadPropertyEditor(); } @Inject  JPADataObjectFieldEditor(JPADataObjectFieldEditorView view,
                                    DomainHandlerRegistry handlerRegistry,
                                    Event<DataModelerEvent> dataModelerEvent,
                                    DataModelCommandBuilder commandBuilder); @Override Widget asWidget(); @Override String getName(); @Override String getDomainName(); @Override void onIdentifierFieldChange(DataModelerPropertyEditorFieldInfo fieldInfo, String newValue); @Override void onColumnFieldChange(DataModelerPropertyEditorFieldInfo fieldInfo, String newValue); @Override void onGeneratedValueFieldChange(DataModelerPropertyEditorFieldInfo fieldInfo, String newValue); @Override void onSequenceGeneratorFieldChange(DataModelerPropertyEditorFieldInfo fieldInfo, String newValue); @Override void onRelationTypeFieldChange(DataModelerPropertyEditorFieldInfo fieldInfo, String newValue); void clear();  }### Answer:
@Test public void loadDataObjectFieldTest() { JPADataObjectFieldEditor fieldEditor = createFieldEditor(); DataObject dataObject = context.getDataObject(); ObjectProperty field = dataObject.getProperty( "field1" ); context.setObjectProperty( field ); fieldEditor.onContextChange( context ); verify( view, times( 2 ) ).loadPropertyEditorCategories( anyListOf( PropertyEditorCategory.class ) ); assertFalse( fieldEditor.isReadonly() ); }