DataProvider { public void update(Iterable<T> items) { reset(); for (T item : items) { allItems.put(getId(item), item); } applyFilterSortAndPaging(); showItems(); updateSelection(); } DataProvider(Function<T, String> identifier, boolean multiSelect);   DataProvider(Function<T, String> identifier, boolean multiSelect, int pageSize); void update(Iterable<T> items); boolean contains(T item); boolean isVisible(T item); String getId(T item); Iterable<T> getAllItems(); Iterable<T> getFilteredItems(); Iterable<T> getVisibleItems(); void onSelect(SelectHandler<T> selectHandler); void selectAll(); void selectVisible(); void clearAllSelection(); void clearVisibleSelection(); void select(T item, boolean select); SelectionInfo<T> getSelectionInfo(); void addFilter(String name, FilterValue<T> filter); void removeFilter(String name); void clearFilters(); @SuppressWarnings("unchecked") FilterValue<T> getFilter(String name); boolean hasFilters(); void setComparator(Comparator<T> comparator); Comparator<T> getComparator(); void setPageSize(int pageSize); void gotoFirstPage(); void gotoPreviousPage(); void gotoNextPage(); void gotoLastPage(); void gotoPage(int page); PageInfo getPageInfo(); void addDisplay(Display<T> display);  }
@Test public void updateItems() throws Exception { int[] items = items(PAGE_SIZE); single.update(asList(items)); assertVisibleFilteredAll(single, items, items, items); }