ActionWorkItemSetFieldPlugin extends BaseDecisionTableColumnPlugin implements HasFieldPage,
                                                                                           HasPatternPage,
                                                                                           HasWorkItemPage,
                                                                                           HasAdditionalInfoPage { @Override public Boolean generateColumn() { final ActionCol52 actionCol52 = editingWrapper().getActionCol52(); if (isNewColumn()) { presenter.appendColumn(actionCol52); } else { try { presenter.updateColumn(originalCol(), editingCol()); } catch (ModelSynchronizer.VetoException veto) { wizard.showGenericVetoError(); return false; } } return true; } @Inject  ActionWorkItemSetFieldPlugin(final PatternPage patternPage,
                                        final FieldPage fieldPage,
                                        final AdditionalInfoPage additionalInfoPage,
                                        final WorkItemPage workItemPage,
                                        final Event<WizardPageStatusChangeEvent> changeEvent,
                                        final TranslationService translationService); @Override void init(final NewGuidedDecisionTableColumnWizard wizard); @Override String getWorkItem(); @Override void setWorkItem(final String workItemKey); @Override ActionCol52 editingCol(); @Override Boolean isWorkItemSet(); @Override PortableWorkDefinition getWorkItemDefinition(); @Override void forEachWorkItem(BiConsumer<String, String> biConsumer); @Override void setWorkItemPageAsCompleted(); @Override String getHeader(); @Override void setHeader(final String header); @Override Set<String> getAlreadyUsedColumnHeaders(); @Override boolean isHideColumn(); @Override void setHideColumn(boolean hideColumn); @Override void setInsertLogical(final Boolean isInsertLogical); @Override void setUpdate(final Boolean isUpdate); @Override String getTitle(); @Override List<WizardPage> getPages(); @Override Boolean generateColumn(); @Override PatternWrapper patternWrapper(); @Override void setEditingPattern(final PatternWrapper patternWrapper); @Override String getEntryPointName(); @Override void setEntryPointName(final String entryPointName); @Override String getPatternPageDescription(); @Override Set<PatternWrapper> getPatterns(); @Override int constraintValue(); @Override FieldAccessorsAndMutators getAccessor(); @Override boolean filterEnumFields(); @Override boolean isFieldBindingValid(); @Override String getBinding(); @Override void setBinding(final String binding); @Override boolean isBindable(); @Override String getFactField(); @Override void setFactField(final String selectedValue); @Override boolean showUpdateEngineWithChanges(); @Override boolean showLogicallyInsert(); @Override boolean isLogicallyInsert(); @Override boolean isUpdateEngine(); @Override Type getType();  }
@Test public void testGenerateColumnWhenColumnIsNotNewAndVetoed() throws Exception { doReturn(false).when(plugin).isNewColumn(); doThrow(VetoException.class).when(presenter).updateColumn(any(ActionCol52.class), any(ActionCol52.class)); assertFalse(plugin.generateColumn()); verify(wizard).showGenericVetoError(); }