ActionRetractFactPlugin extends BaseDecisionTableColumnPlugin implements HasAdditionalInfoPage { @Override public Boolean generateColumn() { if (isNewColumn()) { presenter.appendColumn(editingCol()); } else { try { presenter.updateColumn(originalCol(), editingCol()); } catch (VetoException veto) { wizard.showGenericVetoError(); return false; } } return true; } @Inject  ActionRetractFactPlugin(final PatternToDeletePage patternToDeletePage,
                                   final AdditionalInfoPage additionalInfoPage,
                                   final Event<WizardPageStatusChangeEvent> changeEvent,
                                   final TranslationService translationService); @Override void init(final NewGuidedDecisionTableColumnWizard wizard); @Override String getTitle(); @Override List<WizardPage> getPages(); @Override Boolean generateColumn(); @Override ActionRetractFactCol52 editingCol(); @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 value); @Override void setUpdate(final Boolean value); @Override boolean showUpdateEngineWithChanges(); @Override boolean showLogicallyInsert(); @Override boolean isLogicallyInsert(); @Override boolean isUpdateEngine(); String getEditingColStringValue(); void setEditingColStringValue(final String pattern); void setPatternToDeletePageAsCompleted(); Boolean isPatternToDeletePageCompleted(); @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(); }