DataObjectFieldPicker implements DataObjectFieldPickerView.Presenter,
                                              IsWidget { @Override public DataObjectFieldPickerItem addFieldPickerItem() { DataObjectFieldPickerItem fieldPickerItem = fieldPickerItemProducer.get(); fieldPickerItem.init(dataModel, rootDataObject, this); fieldPickerItemList.add(fieldPickerItem); view.addFieldPickerItem(fieldPickerItem); fieldPickerItem.setFieldPickerItemIndex(fieldPickerItemList.size()); return fieldPickerItem; } @Inject  DataObjectFieldPicker(final DataObjectFieldPickerView view,
                                 final ManagedInstance<DataObjectFieldPickerItem> fieldPickerItemProducer); void init(DataModel dataModel,
                     DataObject rootDataObject,
                     List<ObjectPropertyPath> objectPropertyPaths,
                     PlannerDataObjectEditorView.Presenter presenter); void destroy(); @Override void onFieldPickerItemRemoved(DataObjectFieldPickerItem fieldPickerItem); @Override void onComparatorSpecified(boolean specified); @Override void onMoveFieldPickerItemUp(DataObjectFieldPickerItem fieldPickerItem); @Override void onMoveFieldPickerItemDown(DataObjectFieldPickerItem fieldPickerItem); @Override DataObjectFieldPickerItem addFieldPickerItem(); @Override Widget asWidget(); void objectPropertyPathChanged(boolean itemsRemoved); boolean isEmpty();  }
@Test public void addFieldPickerItem() { initFieldPicker(); when(fieldPickerItemProducer.get()).thenReturn(mock(DataObjectFieldPickerItem.class)); fieldPicker.addFieldPickerItem(); verify(view, times(1)).addFieldPickerItem(any(DataObjectFieldPickerItem.class)); }