BRLConditionColumnPlugin extends BaseDecisionTableColumnPlugin implements HasDefaultValuesPage,
                                                                                       HasRuleModellerPage,
                                                                                       HasAdditionalInfoPage,
                                                                                       TemplateVariablesChangedEvent.Handler { BRLConditionVariableColumn cloneVariable(BRLConditionVariableColumn variable) { final BRLConditionVariableColumn clone = new BRLConditionVariableColumn(variable.getVarName(), variable.getFieldType(), variable.getFactType(), variable.getFactField()); if (variable.getDefaultValue() != null) { clone.setDefaultValue(variable.getDefaultValue().cloneDefaultValueCell()); } clone.setHeader(variable.getHeader()); clone.setHideColumn(variable.isHideColumn()); clone.setWidth(variable.getWidth()); clone.setOperator(variable.getOperator()); return clone; } @Inject  BRLConditionColumnPlugin(final RuleModellerPage ruleModellerPage,
                                    final DefaultValuesPage defaultValuesPage,
                                    final AdditionalInfoPage additionalInfoPage,
                                    final Event<WizardPageStatusChangeEvent> changeEvent,
                                    final TranslationService translationService); @Override void init(final NewGuidedDecisionTableColumnWizard wizard); @Override void onClose(); @Override String getTitle(); @Override List<WizardPage> getPages(); @Override Boolean generateColumn(); @Override Type getType(); @Override boolean setupDefinedVariables(RuleModel ruleModel); @Override BRLConditionColumn editingCol(); @Override String getHeader(); @Override void setHeader(String header); @Override Set<String> getAlreadyUsedColumnHeaders(); @Override boolean isHideColumn(); @Override void setHideColumn(boolean hideColumn); @Override void setInsertLogical(Boolean value); @Override void setUpdate(Boolean value); @Override boolean showUpdateEngineWithChanges(); @Override boolean showLogicallyInsert(); @Override boolean isLogicallyInsert(); @Override boolean isUpdateEngine(); @Override RuleModel getRuleModel(); @Override Collection<RuleModellerActionPlugin> getRuleModellerActionPlugins(); @Override RuleModellerConfiguration getRuleModellerConfiguration(); @Override String getRuleModellerDescription(); @Override void setRuleModellerPageAsCompleted(); @Override Boolean isRuleModellerPageCompleted(); @Override TableFormat tableFormat(); @Override void onTemplateVariablesChanged(TemplateVariablesChangedEvent event);  }
@Test public void testCloneVariable() throws Exception { final BRLConditionVariableColumn variable = makeVariable("variableName", "variableFieldType", "variableFactType", "variableFactField", "variableHeader", false, 999); final BRLConditionVariableColumn clone = plugin.cloneVariable(variable); assertEquals(variable.getVarName(), clone.getVarName()); assertEquals(variable.getFieldType(), clone.getFieldType()); assertEquals(variable.getFactType(), clone.getFactType()); assertEquals(variable.getFactField(), clone.getFactField()); assertEquals(variable.getHeader(), clone.getHeader()); assertEquals(variable.isHideColumn(), clone.isHideColumn()); assertEquals(variable.getWidth(), clone.getWidth()); assertNotSame(variable, clone); }