### Question:
DroolsDataObjectFieldEditor extends FieldEditor implements DroolsDataObjectFieldEditorView.Presenter { @Override protected void loadDataObjectField( DataObject dataObject, ObjectProperty objectField ) { clear(); setReadonly( true ); if ( dataObject != null && objectField != null ) { this.dataObject = dataObject; this.objectField = objectField; Annotation annotation = objectField.getAnnotation( DroolsDomainAnnotations.KEY_ANNOTATION ); if ( annotation != null ) { view.setEquals( Boolean.TRUE ); } annotation = objectField.getAnnotation( DroolsDomainAnnotations.POSITION_ANNOTATION ); if ( annotation != null ) { Object positionValue = annotation.getValue( DroolsDomainAnnotations.VALUE_PARAM ); String position = positionValue != null ? positionValue.toString() : ""; view.setPosition( position ); } setReadonly( getContext() == null || getContext().isReadonly() ); } } @Inject  DroolsDataObjectFieldEditor( DroolsDataObjectFieldEditorView view,
            DomainHandlerRegistry handlerRegistry,
            Event<DataModelerEvent> dataModelerEvent,
            DataModelCommandBuilder commandBuilder ); @Override Widget asWidget(); @Override String getName(); @Override String getDomainName(); void setReadonly( boolean readonly ); @Override void clear(); @Override void onEqualsChange(); @Override void onPositionChange();  }### Answer:
@Test public void loadDataObjectFieldTest() { DroolsDataObjectFieldEditor fieldEditor = createFieldEditor(); DataObject dataObject = context.getDataObject(); ObjectProperty field1 = dataObject.getProperty( "field1" ); context.setObjectProperty( field1 );; fieldEditor.onContextChange( context ); verify( view, times( 1 ) ).setEquals( true ); verify( view, times( 1 ) ).setPosition( "0" ); assertFalse( fieldEditor.isReadonly() ); }