PerspectiveDropDown implements IsWidget { public void setPerspectiveNameProvider(PerspectiveNameProvider perspectiveNameProvider) { this.perspectiveNameProvider = perspectiveNameProvider; } @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 testCustomNames() { perspectiveDropDown.setPerspectiveNameProvider(itemId -> "x"); perspectiveDropDown.searchService.search("A", -1, itemList -> { assertEquals(itemList.size(), 0); }); perspectiveDropDown.searchService.search("x", -1, itemList -> { assertEquals(itemList.size(), 2); }); }