ConfigurableFilterDataProviderWrapper extends DataProviderWrapper<T, Q, F> implements ConfigurableFilterDataProvider<T, Q, C> { @Override public void setFilter(C filter) { this.configuredFilter = filter; refreshAll(); } ConfigurableFilterDataProviderWrapper(
            DataProvider<T, F> dataProvider); @Override void setFilter(C filter);  }
@Test public void void_setFilter() { configurableVoid.setFilter(xyzFilter); Assert.assertEquals("Set filter should be used", 1, configurableVoid.size(new Query<>())); configurableVoid.setFilter(null); Assert.assertEquals("null filter should return all items", 100, configurableVoid.size(new Query<>())); }
@Test public void predicate_setFilter() { configurablePredicate.setFilter(Integer.valueOf(50)); Assert.assertEquals("Set filter should be used", 49, configurablePredicate.size(new Query<>())); configurablePredicate.setFilter(null); Assert.assertEquals("null filter should return all items", 100, configurablePredicate.size(new Query<>())); }
@Test public void predicate_combinedFilters() { configurablePredicate.setFilter(Integer.valueOf(50)); Assert.assertEquals("Both filters should be used", 0, configurablePredicate.size(new Query<>("Xyz"))); configurablePredicate.setFilter(null); Assert.assertEquals("Only zyz filter should be used", 1, configurablePredicate.size(new Query<>("Xyz"))); }
@Test public void void_setFilter() { configurableVoid.setFilter(xyzFilter); assertEquals("Set filter should be used", 1, configurableVoid.size(new Query<>())); configurableVoid.setFilter(null); assertEquals("null filter should return all items", 100, configurableVoid.size(new Query<>())); }
@Test public void predicate_setFilter() { configurablePredicate.setFilter(Integer.valueOf(50)); assertEquals("Set filter should be used", 49, configurablePredicate.size(new Query<>())); configurablePredicate.setFilter(null); assertEquals("null filter should return all items", 100, configurablePredicate.size(new Query<>())); }
@Test public void predicate_combinedFilters() { configurablePredicate.setFilter(Integer.valueOf(50)); assertEquals("Both filters should be used", 0, configurablePredicate.size(new Query<>("Xyz"))); configurablePredicate.setFilter(null); assertEquals("Only zyz filter should be used", 1, configurablePredicate.size(new Query<>("Xyz"))); }