PatternPage extends BaseDecisionTableColumnPage<T> { public void setEditingPattern(final PatternWrapper wrapper) { wrapper.setEntryPointName(view.getEntryPointName()); plugin().setEditingPattern(wrapper); } @Inject  PatternPage(final View view,
                       final NewPatternPresenter newPatternPresenter,
                       final TranslationService translationService); @Override void initialise(); @Override String getTitle(); @Override void isComplete(final Callback<Boolean> callback); @Override void prepareView(); GuidedDecisionTableView.Presenter presenter(); void setEditingPattern(final PatternWrapper wrapper); void disableEntryPoint(); boolean isNegatedPatternEnabled(); void disableNegatedPatterns(); boolean isPatternCreationEnabled(); void disablePatternCreation();  }
@Test public void testSetEditingPattern() throws Exception { when(view.getEntryPointName()).thenReturn("entryPoint"); final PatternWrapper pattern = spy(newPattern("factType1", "boundName1", false)); page.setEditingPattern(pattern); verify(pattern).setEntryPointName("entryPoint"); verify(plugin).setEditingPattern(pattern); }