@Override
    public MongoPaginationHelper<T> perPage(int perPage) {
        return new DefaultMongoPaginationHelper<>(collection, filter, sort, perPage, includeGrandTotal,
                grandTotalFilter, collation);
    }
@Test
    void testPerPage() {
        assertThat(paginationHelper.page(1))
                .isEqualTo(paginationHelper.perPage(0).page(1))
                .isEqualTo(paginationHelper.perPage(0).page(1, alwaysTrue()))
                .containsExactlyElementsOf(DTOs);

        final MongoPaginationHelper<DTO> helper = paginationHelper.perPage(8);

        assertThat(helper.page(1)).containsExactlyElementsOf(DTOs.subList(0, 8));
        assertThat(helper.page(1, alwaysTrue())).containsExactlyElementsOf(DTOs.subList(0, 8));
        assertThat(helper.page(2)).containsExactlyElementsOf(DTOs.subList(8, 16));
        assertThat(helper.page(2, alwaysTrue())).containsExactlyElementsOf(DTOs.subList(8, 16));

        assertThat(helper.page(1).pagination()).satisfies(pagination -> {
            assertThat(pagination.total()).isEqualTo(16);
            assertThat(pagination.page()).isEqualTo(1);
            assertThat(pagination.perPage()).isEqualTo(8);
        });
    }