### Question:
DataProvider { public boolean contains(T item) { return allItems.containsKey(identifier.apply(item)); } 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);  }### Answer:
@Test public void contains() throws Exception { int[] items = items(23); single.update(asList(items)); assertTrue(single.contains(0)); assertTrue(single.contains(9)); assertTrue(single.contains(10)); assertTrue(single.contains(22)); assertFalse(single.contains(23)); }