PatternPage extends BaseDecisionTableColumnPage<T> { void setSelectedEditingPattern() { final String selectedValue = view.getSelectedValue(); final PatternWrapper patternWrapper = findPatternWrapperByKey(selectedValue); setEditingPattern(patternWrapper); } @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 testSetSelectedEditingPattern() throws Exception { final PatternWrapper patternWrapper = mock(PatternWrapper.class); final String key = "factType boundName false"; when(page.findPatternWrapperByKey(key)).thenReturn(patternWrapper); when(view.getSelectedValue()).thenReturn(key); page.setSelectedEditingPattern(); verify(page).setEditingPattern(patternWrapper); }