Page { public boolean isEmpty() { return items.isEmpty(); } Page(Collection<? extends ITEM_T> items, long itemsBefore, int pageSize, long totalCount); boolean isEmpty(); boolean hasNextPage(); boolean hasPreviousPage(); PageRef getNextPageRef(); PageRef getPreviousPageRef(); PageRef getLastPageRef(); PageRef getFirstPageRef(); int getSize(); long getNumber(); int getItemsCount(); long getTotalItemsCount(); List<ITEM_T> getItems(); List<R> getItems(Function<? super ITEM_T, ? extends R> mapper); COL_T fill(COL_T container);  }
@Test public void pageShouldBeEmptyWhenItIsCreatedWithAneEmptyItemsCollection() throws Exception { assertTrue(new Page<>(emptyList(), 1, 1, 1).isEmpty()); }