PagedDataProvider extends AbstractDataProvider<T, F> { public PagingControls getPagingControls() { return pagingControls; } PagedDataProvider(DataProvider<T, F> dataProvider);  PagedDataProvider(DataProvider<T, F> dataProvider, int pageLength); @Override boolean isInMemory(); @Override int size(Query<T, F> query); PagingControls getPagingControls(); @Override Stream<T> fetch(Query<T, F> query);  }
@Test public void testPageLengthPropagation() { Assert.assertEquals(PagedDataProvider.DEFAULT_PAGE_LENGTH, new PagedDataProvider<>(dp).getPagingControls().getPageLength()); Assert.assertEquals(Integer.MAX_VALUE, new PagedDataProvider<>(dp, Integer.MAX_VALUE).getPagingControls().getPageLength()); }
@Test public void testPageNumberGoingBelow0() { PagingControls controls = pagedDP.getPagingControls(); Assert.assertEquals(0, controls.getPageNumber()); controls.previousPage(); Assert.assertEquals(0, controls.getPageNumber()); }