void (String filter, List<String> idsThatMustBePresent, List<String> idsThatMustNotBePresent) { if (filter != null) { myActionsTree.filter(filter, new QuickList[0]); } List<String> missing = new ArrayList<>(); List<String> present = new ArrayList<>(); for (String actionId : idsThatMustBePresent) { if (!myActionsTree.getMainGroup().containsId(actionId)) missing.add(actionId); } for (String actionId : idsThatMustNotBePresent) { if (myActionsTree.getMainGroup().containsId(actionId)) present.add(actionId); } assertTrue(missing.isEmpty() && present.isEmpty(), "Missing actions: " + missing + "\nWrongly shown: " + present); }