SavedFiltersPresenter implements RestoreDefaultFiltersMenuBuilder.SupportsRestoreDefaultFilters { public void onSaveFilter(@Observes final SavedFilterAddedEvent event) { view.addSavedFilter(event.getFilter()); }  @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 testOnSaveFilter() { final SavedFilter filter = new SavedFilter("key", "name"); presenter.onSaveFilter(new SavedFilterAddedEvent(filter)); verify(view).addSavedFilter(filter); }