### Question:
ActionRetractFactPlugin extends BaseDecisionTableColumnPlugin implements HasAdditionalInfoPage { @Override public List<WizardPage> getPages() { return new ArrayList<WizardPage>() {{ if (tableFormat() == GuidedDecisionTable52.TableFormat.LIMITED_ENTRY) { add(patternToDeletePage); } add(additionalInfoPage()); }}; } @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();  }### Answer:
@Test public void testGetPagesWhenTableFormatIsLimitedEntry() throws Exception { model.setTableFormat(GuidedDecisionTable52.TableFormat.LIMITED_ENTRY); doReturn(model).when(presenter).getModel(); final List<WizardPage> pages = plugin.getPages(); final boolean hasPatternToDeletePage = pages.stream().anyMatch(a -> a instanceof PatternToDeletePage); assertTrue(hasPatternToDeletePage); assertEquals(2, pages.size()); }
@Test public void testGetPagesWhenTableFormatIsNotLimitedEntry() throws Exception { model.setTableFormat(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY); doReturn(model).when(presenter).getModel(); final List<WizardPage> pages = plugin.getPages(); final boolean hasPatternToDeletePage = pages.stream().anyMatch(a -> a instanceof PatternToDeletePage); assertFalse(hasPatternToDeletePage); assertEquals(1, pages.size()); }