JobListFilterSettingsManager extends FilterSettingsManagerImpl { @Override public void loadSavedFiltersFromPreferences(final MultiGridPreferencesStore store, final Consumer<List<SavedFilter>> savedFiltersConsumer) { final ArrayList<String> existingGrids = new ArrayList<>(store.getGridsId()); if (existingGrids.contains(TAB_ALL)) { removeSavedFilterFromPreferences(TAB_ALL, store, () -> super.loadSavedFiltersFromPreferences(store, savedFiltersConsumer)); } else { super.loadSavedFiltersFromPreferences(store, savedFiltersConsumer); } }  @Override String getGridGlobalPreferencesKey(); @Override FilterSettings createFilterSettingsPrototype(); @Override void loadSavedFiltersFromPreferences(final MultiGridPreferencesStore store,
                                                   final Consumer<List<SavedFilter>> savedFiltersConsumer); @Override List<FilterSettings> initDefaultFilters();  }
@Test public void testDefaultFilters() { Consumer<List<SavedFilter>> callback = filters -> { assertEquals(6, filters.size()); assertEquals(Constants.INSTANCE.Queued(), filters.get(0).getName()); assertEquals(REQUEST_LIST_PREFIX + "_" + DEFAULT_FILTER_SETTINGS_KEY, filters.get(1).getKey()); assertEquals(Constants.INSTANCE.Running(), filters.get(1).getName()); assertEquals(Constants.INSTANCE.Retrying(), filters.get(2).getName()); assertEquals(Constants.INSTANCE.Error(), filters.get(3).getName()); assertEquals(Constants.INSTANCE.Completed(), filters.get(4).getName()); assertEquals(Constants.INSTANCE.Canceled(), filters.get(5).getName()); }; final MultiGridPreferencesStore store = new MultiGridPreferencesStore(); manager.loadSavedFiltersFromPreferences(store, callback); verify(userPreferencesService).saveUserPreferences(store); }