### Question:
MainDataObjectEditor extends ObjectEditor implements MainDataObjectEditorView.Presenter { @Override protected void loadDataObject(DataObject dataObject) { clear(); setReadonly(true); if (dataObject != null) { this.dataObject = dataObject; view.setName(dataObject.getName()); Annotation annotation = dataObject.getAnnotation(MainDomainAnnotations.LABEL_ANNOTATION); if (annotation != null) { view.setLabel(AnnotationValueHandler.getStringValue(annotation, MainDomainAnnotations.VALUE_PARAM)); } annotation = dataObject.getAnnotation(MainDomainAnnotations.DESCRIPTION_ANNOTATION); if (annotation != null) { view.setDescription(AnnotationValueHandler.getStringValue(annotation, MainDomainAnnotations.VALUE_PARAM)); } view.setPackageName(dataObject.getPackageName()); initSuperClassList(false); setReadonly(getContext() == null || getContext().isReadonly()); } } @Inject  MainDataObjectEditor(MainDataObjectEditorView view,
                                DomainHandlerRegistry handlerRegistry,
                                Event<DataModelerEvent> dataModelerEvent,
                                DataModelCommandBuilder commandBuilder,
                                ValidatorService validatorService,
                                Caller<DataModelerService> modelerService,
                                ShowAssetUsagesDisplayer showAssetUsagesDisplayer); @Override Widget asWidget(); @Override String getName(); @Override String getDomainName(); void onContextChange(DataModelerContext context); void refreshTypeList(boolean keepSelection); void setReadonly(boolean readonly); @Override void onNameChange(); @Override void onLabelChange(); @Override void onDescriptionChange(); @Override void onSuperClassChange(); @Override void onPackageAdded(); @Override void onPackageChange(); void doPackageChange(String packageName); void clear();  }### Answer:
@Test public void loadDataObjectTest() { MainDataObjectEditor objectEditor = createObjectEditor(); objectEditor.onContextChange(context); DataObject dataObject = context.getDataObject(); verify(view, times(1)).setName(dataObject.getName()); verify(view, times(1)).setPackageName(dataObject.getPackageName()); verify(view, times(1)).initSuperClassList(anyList(), eq(dataObject.getSuperClassName())); verify(view, times(1)).setLabel(AnnotationValueHandler.getStringValue(dataObject, Label.class.getName(), "value")); verify(view, times(1)).setDescription(AnnotationValueHandler.getStringValue(dataObject, Description.class.getName(), "value")); assertFalse(objectEditor.isReadonly()); }