AbstractDataView implements DataView<T> { @Override public Stream<T> getItems() { return dataProviderSupplier.get().fetch(new Query<>()); } AbstractDataView(
            SerializableSupplier<? extends DataProvider<T, ?>> dataProviderSupplier,
            Component component); @Override Registration addItemCountChangeListener(
            ComponentEventListener<ItemCountChangeEvent<?>> listener); @Override Stream<T> getItems(); @Override void refreshItem(T item); @Override void setIdentifierProvider(
            IdentifierProvider<T> identifierProvider);  }
@Test public void getItems_noFiltersSet_allItemsObtained() { Stream<Item> allItems = dataView.getItems(); Assert.assertArrayEquals("Unexpected data set", items.toArray(), allItems.toArray()); }
@Test public void getItems_sortingSet_sortedItemsObtained() { dataProvider.setSortOrder(Item::getId, SortDirection.DESCENDING); Assert.assertArrayEquals("Unexpected items sorting", new Long[] { 3L, 2L, 1L }, dataView.getItems().map(Item::getId).toArray()); }