PerspectiveDropDown implements IsWidget { public void setPerspectiveIdsExcluded(Set<String> perspectiveIdsExcluded) { this.perspectiveIdsExcluded = perspectiveIdsExcluded; } @Inject  PerspectiveDropDown(ActivityBeansCache activityBeansCache,
                               LiveSearchDropDown liveSearchDropDown); @Override Widget asWidget(); void setPerspectiveNameProvider(PerspectiveNameProvider perspectiveNameProvider); void setPerspectiveIdsExcluded(Set<String> perspectiveIdsExcluded); PerspectiveActivity getDefaultPerspective(); PerspectiveActivity getSelectedPerspective(); void setSelectedPerspective(String perspectiveId); void setSelectedPerspective(PerspectiveActivity selectedPerspective); void setMaxItems(int maxItems); void setWidth(int minWidth); void setOnChange(Command onChange); void clear(); String getItemName(PerspectiveActivity p); String getItemName(String perspectiveId);  }
@Test public void testExcludeItems() { Set<String> excluded = new HashSet<>(); excluded.add("A"); perspectiveDropDown.setPerspectiveIdsExcluded(excluded); perspectiveDropDown.searchService.search("", -1, itemList -> { assertEquals(itemList.size(), 1); assertEquals(itemList.get(0).getKey(), "B"); }); }