BasicFiltersViewImpl implements BasicFiltersView,
                                             IsElement { protected <T extends Object> void addActiveFilter(final String labelKey, final String labelValue, final String hint, final T value, final Consumer<ActiveFilterItem<T>> callback) { if (callback != null) { callback.accept(new ActiveFilterItem(labelKey, labelKey + ": " + labelValue, hint, value, null)); } }  @PostConstruct void init(); @Override HTMLElement getElement(); @Override void addTextFilter(final String label,
                              final String placeholder,
                              final Consumer<ActiveFilterItem<String>> callback); @Override void addTextFilter(String label, String placeholder, boolean disableFiltersInputHelp, Consumer<ActiveFilterItem<String>> callback); @Override void addNumericFilter(final String label,
                                 final String placeholder,
                                 final Consumer<ActiveFilterItem<Integer>> callback); @Override void addDataSetSelectFilter(final String label,
                                       final DataSetLookup lookup,
                                       final String textColumnId,
                                       final String valueColumnId,
                                       final Consumer<ActiveFilterItem<String>> callback); @Override void addDateRangeFilter(final String label,
                                   final String placeholder,
                                   final Boolean useMaxDate,
                                   final Consumer<ActiveFilterItem<DateRange>> callback); @Override void addSelectFilter(final String label,
                                final Map<String, String> options,
                                final Consumer<ActiveFilterItem<String>> callback); @Override void clearAllSelectFilter(); @Override void checkSelectFilter(final String label,
                                  final String value); @Override void clearSelectFilter(final String label); @Override void addMultiSelectFilter(final String label,
                                     final Map<String, String> options,
                                     final Consumer<ActiveFilterItem<List<String>>> callback); @Override void hideFilterBySection(); @EventHandler("refine-apply") void onApplyClick(@ForEvent("click") Event e);  }
@Test public void testAddActiveFilter() { final Consumer<ActiveFilterItem<Integer>> callback = mock(Consumer.class); final String labelKey = "key1"; final String labelValue = "someValue"; final String hint = "hint"; final Integer value = 1; view.addActiveFilter(labelKey, labelValue, hint, value, callback); ArgumentCaptor<ActiveFilterItem> captor = ArgumentCaptor.forClass(ActiveFilterItem.class); verify(callback).accept(captor.capture()); assertEquals(1, captor.getAllValues().size()); final ActiveFilterItem filterItem = captor.getValue(); assertEquals(labelKey, filterItem.getKey()); assertEquals(labelKey + ": " + labelValue, filterItem.getLabelValue()); assertEquals(hint, filterItem.getHint()); assertEquals(value, filterItem.getValue()); }