protected void testContainerFiltering(Container.Filterable container) {
initializeContainer(container);
// Filter by "contains ab"
SimpleStringFilter filter1 = new SimpleStringFilter(
FULLY_QUALIFIED_NAME, "ab", false, false);
container.addContainerFilter(filter1);
assertTrue(container.getContainerFilters().size() == 1);
assertEquals(filter1, container.getContainerFilters().iterator().next());
validateContainer(container, "com.vaadin.data.BufferedValidatable",
"com.vaadin.ui.TabSheet",
"com.vaadin.terminal.gwt.client.Focusable",
"com.vaadin.data.Buffered", isFilteredOutItemNull(), 20);
// Filter by "contains da" (reversed as ad here)
container.removeAllContainerFilters();
assertTrue(container.getContainerFilters().isEmpty());
SimpleStringFilter filter2 = new SimpleStringFilter(
REVERSE_FULLY_QUALIFIED_NAME, "ad", false, false);
container.addContainerFilter(filter2);
assertTrue(container.getContainerFilters().size() == 1);
assertEquals(filter2, container.getContainerFilters().iterator().next());