### Question:
ActionSetFactPlugin extends BaseDecisionTableColumnPlugin implements HasFieldPage,
                                                                                  HasPatternPage,
                                                                                  HasValueOptionsPage,
                                                                                  HasAdditionalInfoPage { ActionWrapper newActionWrapper(final DTColumnConfig52 column) { if (column instanceof ActionInsertFactCol52) { return new ActionInsertFactWrapper(this, (ActionInsertFactCol52) column); } if (column instanceof ActionSetFieldCol52) { return new ActionSetFactWrapper(this, (ActionSetFieldCol52) column); } throw new UnsupportedOperationException("Unsupported column type: " + column.getClass().getSimpleName()); } @Inject  ActionSetFactPlugin(final PatternPage patternPage,
                               final FieldPage fieldPage,
                               final ValueOptionsPage<ActionSetFactPlugin> valueOptionsPage,
                               final AdditionalInfoPage<ActionSetFactPlugin> 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 void setValueOptionsPageAsCompleted(); @Override Boolean isValueOptionsPageCompleted(); @Override boolean isFieldBindingValid(); @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 String getFactType(); @Override FieldAccessorsAndMutators getAccessor(); @Override boolean filterEnumFields(); @Override String getFactField(); @Override void setFactField(final String selectedValue); @Override Pattern52 editingPattern(); @Override ActionCol52 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(); @Override String getValueList(); @Override void setValueList(final String valueList); @Override String getBinding(); @Override void setBinding(final String binding); @Override GuidedDecisionTable52.TableFormat tableFormat(); @Override boolean doesOperatorNeedValue(); @Override boolean isBindable(); @Override boolean doesOperatorAcceptValueList(); @Override IsWidget defaultValueWidget(); @Override IsWidget limitedValueWidget(); @Override Type getType();  }### Answer:
@Test public void testNewActionWrapperWhenColumnIsAnActionInsertFactCol52() throws Exception { final GuidedDecisionTable52 model = mock(GuidedDecisionTable52.class); when(model.getTableFormat()).thenReturn(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY); when(presenter.getModel()).thenReturn(model); final ActionWrapper wrapper = plugin.newActionWrapper(mock(ActionInsertFactCol52.class)); assertTrue(wrapper instanceof ActionInsertFactWrapper); }
@Test public void testNewActionWrapperWhenColumnIsAnActionSetFactWrapper() throws Exception { final GuidedDecisionTable52 model = mock(GuidedDecisionTable52.class); when(model.getTableFormat()).thenReturn(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY); when(presenter.getModel()).thenReturn(model); final ActionWrapper wrapper = plugin.newActionWrapper(mock(ActionSetFieldCol52.class)); assertTrue(wrapper instanceof ActionSetFactWrapper); }
@Test(expected = UnsupportedOperationException.class) public void testNewActionWrapperWhenColumnIsInvalid() throws Exception { final GuidedDecisionTable52 model = mock(GuidedDecisionTable52.class); when(model.getTableFormat()).thenReturn(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY); when(presenter.getModel()).thenReturn(model); plugin.newActionWrapper(mock(ConditionCol52.class)); }