SavedFiltersPresenter implements RestoreDefaultFiltersMenuBuilder.SupportsRestoreDefaultFilters { protected void loadSavedFilters() { filterSettingsManager.loadSavedFilters(filters -> filters.forEach(f -> view.addSavedFilter(f))); }  @WorkbenchPartView IsElement getView(); @WorkbenchPartTitle String getTitle(); @PostConstruct void init(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); void setFilterSettingsManager(final FilterSettingsManager filterSettingsManager); void onSaveFilter(@Observes final SavedFilterAddedEvent event); void onRemoveSavedFilter(@Observes final SavedFilterRemoveEvent event); @Override void onRestoreDefaultFilters(); void onSaveDefaultActiveFilter(@Observes final SavedFilterAsDefaultActiveEvent event);  }
@Test public void testLoadSavedFilters() { final SavedFilter filter = new SavedFilter("key", "name"); doAnswer(invocation -> { Consumer<List<SavedFilter>> filters = (Consumer<List<SavedFilter>>) invocation.getArguments()[0]; filters.accept(singletonList(filter)); return null; }).when(filterSettingsManager).loadSavedFilters(any()); presenter.loadSavedFilters(); verify(view).addSavedFilter(filter); }