ActiveFiltersViewImpl implements ActiveFiltersView { protected void setSaveFilterPopoverCallback() { saveFilterPopoverView.setCancelCallback(() -> closeSaveFilter()); saveFilterPopoverView.setSaveCallback(name -> saveFilter(name)); }  @PostConstruct void init(); @PreDestroy void destroy(); @Override void setSaveFilterCallback(final ParameterizedCommand<String> callback); @Override void setRemoveAllFilterCallback(final Command callback); @Override void closeSaveFilter(); @Override void setSaveFilterErrorMessage(final String message); @Override void addActiveFilter(final ActiveFilterItem<T> filter); void onRemoveActiveFilter(@Observes final ActiveFilterItemRemovedEvent event); @Override void removeActiveFilter(final ActiveFilterItem<T> filter); @EventHandler("remove-all-filters") void onRemoveAll(@ForEvent("click") Event e); @EventHandler("save-filter") void onSaveFilter(@ForEvent("click") Event e); @Override void removeAllActiveFilters(final Boolean useCallback); @Override HTMLElement getElement();  }
@Test public void testCancelFilterCallback() { doAnswer(invocation -> { Command callback = (Command) invocation.getArguments()[0]; callback.execute(); return null; }).when(saveFilterPopoverView).setCancelCallback(any()); view.setSaveFilterPopoverCallback(); verify(saveFilterPopover).hide(); }