@Override
    public <T> Page<T> mapToNewPage(long total, List<T> items) {
        return new Page<>(total, items, offset, calculateCurrentPage(), this, previousPageRequest(total), nextPageRequest(total));
    }
@Test
    void testOffsetBasedPageRequestNextPageWorks() {
        OffsetBasedPageRequest offsetBasedPageRequest = Paging.OffsetBasedPage.ascOnUpdatedAt(2);

        Page<Job> jobPage1 = offsetBasedPageRequest.mapToNewPage(50, asList(
                anEnqueuedJob().withName("Job 1").build(),
                anEnqueuedJob().withName("Job 2").build()));
        OffsetBasedPageRequest page2OffsetBasedPageRequest = Paging.OffsetBasedPage.next(jobPage1);

        Page<Job> jobPage2 = page2OffsetBasedPageRequest.mapToNewPage(50, asList(
                anEnqueuedJob().withName("Job 3").build(),
                anEnqueuedJob().withName("Job 4").build()));

        OffsetBasedPageRequest page1OffsetBasedPageRequest = Paging.OffsetBasedPage.previous(jobPage2);
        OffsetBasedPageRequest page3OffsetBasedPageRequest = Paging.OffsetBasedPage.next(jobPage2);

        assertThat(page1OffsetBasedPageRequest)
                .hasFieldOrPropertyWithValue("order", "updatedAt:ASC")
                .hasFieldOrPropertyWithValue("offset", 0L)
                .hasFieldOrPropertyWithValue("limit", 2);

        assertThat(page3OffsetBasedPageRequest)
                .hasFieldOrPropertyWithValue("order", "updatedAt:ASC")
                .hasFieldOrPropertyWithValue("offset", 4L)
                .hasFieldOrPropertyWithValue("limit", 2);
    }