PatternToDeletePage extends BaseDecisionTableColumnPage<ActionRetractFactPlugin> { List<String> loadPatterns() { return getLHSBoundFacts() .stream() .filter(boundName -> !nil(boundName)) .collect(Collectors.toList()); } @Inject  PatternToDeletePage(final View view,
                               final TranslationService translationService); @Override String getTitle(); @Override void isComplete(final Callback<Boolean> callback); @Override void prepareView();  }
@Test public void testLoadPatterns() throws Exception { final ArrayList<String> lhsBoundFacts = new ArrayList<String>() {{ add("boundFact1"); add(""); add("boundFact3"); }}; final ArrayList<String> expectedPatterns = new ArrayList<String>() {{ add("boundFact1"); add("boundFact3"); }}; doReturn(lhsBoundFacts).when(page).getLHSBoundFacts(); final List<String> patterns = page.loadPatterns(); assertEquals(expectedPatterns, patterns); }