PlannerDataObjectFieldEditor extends FieldEditor implements PlannerDataObjectFieldEditorView.Presenter { @Override protected void loadDataObjectField(DataObject dataObject, ObjectProperty objectField) { view.clear(); view.showPlanningFieldPropertiesNotAvailable(true); this.dataObject = dataObject; this.objectField = objectField; if (dataObject != null && objectField != null) { loadPlanningSolution(); loadPlanningEntitySettings(); } } @Inject  PlannerDataObjectFieldEditor(PlannerDataObjectFieldEditorView view,
                                        DomainHandlerRegistry handlerRegistry,
                                        Event<DataModelerEvent> dataModelerEvent,
                                        DataModelCommandBuilder commandBuilder); @Override Widget asWidget(); @Override String getName(); @Override String getDomainName(); @Override void onValueRangeProviderChange(); @Override void onValueRangeProviderIdChange(); @Override void onPlanningVariableChange(); @Override void onValueRangeProviderRefsChange(); @Override void clear();  }
@Test public void loadDataObjectField() { PlannerDataObjectFieldEditor fieldEditor = createFieldEditor(); DataObject dataObject = context.getDataObject(); ObjectProperty field1 = dataObject.getProperty("field1"); context.setObjectProperty(field1); fieldEditor.onContextChange(context); verify(view, times(1)).clear(); verify(view, times(1)).showPlanningFieldPropertiesNotAvailable(true); }