### Question:
DataObjectBrowser implements IsWidget,
                   DataObjectBrowserView.Presenter { void onDataObjectFieldDeleted(@Observes DataObjectFieldDeletedEvent event) { if (event.isFromContext(context != null ? context.getContextId() : null) && !DataModelerEvent.DATA_OBJECT_BROWSER.equals(event.getSource())) { setDataObject(dataObject); } } @Inject  DataObjectBrowser(DomainHandlerRegistry handlerRegistry,
                             DataModelCommandBuilder commandBuilder,
                             Caller<DataModelerService> modelerService,
                             Caller<DataObjectValidationService> dataObjectValidationService,
                             ValidatorService validatorService,
                             Event<DataModelerEvent> dataModelerEvent,
                             Event<DataModelerWorkbenchContextChangeEvent> dataModelerWBContextEvent,
                             Event<LockRequiredEvent> lockRequiredEvent,
                             PlaceManager placeManager,
                             NewFieldPopup newFieldPopup,
                             DataObjectBrowserView view,
                             ShowAssetUsagesDisplayer showAssetUsagesDisplayer); @Override Widget asWidget(); DataModelerContext getContext(); void setContext(DataModelerContext context); @Override void onDeleteProperty(final ObjectProperty objectProperty,
                                 final int index); DataModel getDataModel(); DataObject getDataObject(); void onSelectPropertyType(ObjectProperty property); boolean isReadonly(); void redrawFields(); @Override void onSelectCurrentDataObject(); @Override void onNewProperty(); @Override void onSelectProperty(ObjectProperty selectedProperty); @Override void onSortByName(boolean ascending); @Override void onSortByLabel(boolean ascending); @Override void onSortByType(boolean ascending); @Override String getPropertyTypeDisplayValue(ObjectProperty property); @Override boolean isSelectablePropertyType(ObjectProperty property);  }### Answer:
@Test public void onDataObjectFieldDeleted() { DataObjectBrowser dataObjectBrowser = spy(createBrowser()); DataModelerContext context = createContext(); context.setContextId("contextId"); dataObjectBrowser.setContext(context); DataObject dataObject = mock(DataObject.class); dataObjectBrowser.setDataObject(dataObject); DataObjectFieldDeletedEvent event = new DataObjectFieldDeletedEvent(); event.setContextId("contextId"); Mockito.reset(dataObjectBrowser); dataObjectBrowser.onDataObjectFieldDeleted(event); verify(dataObjectBrowser, times(1)).setDataObject(dataObject); }