ColumnsPagePresenter { DeleteColumnManagementAnchorWidget deleteMetaDataColumnAnchor(final GuidedDecisionTableModellerView.Presenter modeller, final MetadataCol52 metaDataColumn) { final DeleteColumnManagementAnchorWidget deleteWidget = deleteColumnManagementAnchorWidgets.get(); final Command deleteMetadataCommand = deleteMetadataCommand(modeller, metaDataColumn); deleteWidget.init(metaDataColumn.getMetadata(), deleteMetadataCommand); return deleteWidget; } @Inject  ColumnsPagePresenter(final View view,
                                final GuidedDecisionTableAccordion accordion,
                                final ManagedInstance<NewGuidedDecisionTableColumnWizard> wizardManagedInstance,
                                final TranslationService translationService,
                                final ManagedInstance<DeleteColumnManagementAnchorWidget> deleteColumnManagementAnchorWidgets,
                                final ManagedInstance<AttributeColumnConfigRow> attributeColumnConfigRow,
                                final ColumnManagementView conditionsPanel,
                                final ColumnManagementView actionsPanel,
                                final ShowRuleNameOptionPresenter showRuleNameOptionPresenter); @PostConstruct void setup(); View getView(); void init(final GuidedDecisionTableModellerView.Presenter modeller); void onUpdatedLockStatusEvent(final @Observes UpdatedLockStatusEvent event); void onRefreshAttributesPanelEvent(final @Observes RefreshAttributesPanelEvent event); void onRefreshMetaDataPanelEvent(final @Observes RefreshMetaDataPanelEvent event); void onRefreshConditionsPanelEvent(final @Observes RefreshConditionsPanelEvent event); void onRefreshActionsPanelEvent(final @Observes RefreshActionsPanelEvent event); GuidedDecisionTableAccordion getAccordion(); void onDecisionTableSelected(final @Observes DecisionTableSelectedEvent event); void refresh();  }
@Test public void testDeleteMetaDataColumnAnchor() { final DeleteColumnManagementAnchorWidget expectedWidget = mock(DeleteColumnManagementAnchorWidget.class); final String columnHeader = "columnHeader"; final Command command = mock(Command.class); doReturn(columnHeader).when(metadataColumn).getMetadata(); doReturn(expectedWidget).when(deleteColumnManagementAnchorWidgets).get(); doReturn(command).when(presenter).deleteMetadataCommand(modeller, metadataColumn); final DeleteColumnManagementAnchorWidget actualWidget = presenter.deleteMetaDataColumnAnchor(modeller, metadataColumn); verify(actualWidget).init(columnHeader, command); assertEquals(expectedWidget, actualWidget); }