    @Test
    public void getContentTypeUsageDetailsWithPagination() {


        int pageSize = 2;
        this.restListRequest.setPageSize(pageSize);

        // creates paged data
        List<Integer> pageList = Arrays.asList(1, 2);
        ContentDto[][] utilizers = {
                { ContentMockHelper.mockContentDto(0), ContentMockHelper.mockContentDto(1) },
                { ContentMockHelper.mockContentDto(2) }
        };
        ContentDto[] allUtilizers = ArrayUtils.addAll(utilizers[0], utilizers[1]);

        int totalItems = utilizers[0].length + utilizers[1].length;

        // does assertions
        IntStream.range(0, pageList.size())
                .forEach(i -> {

                    restListRequest.setPage(pageList.get(i));

                    PagedMetadata<ContentDto> contentDtoPagedMetadata = ContentMockHelper.mockPagedContentDto(restListRequest, totalItems);
                    contentDtoPagedMetadata.setTotalItems(totalItems);
                    when(this.contentService.getContents(any(), any())).thenReturn(contentDtoPagedMetadata);
                    mockPagedMetadata(allUtilizers, pageList.get(i), 2, pageSize, totalItems);

                    PagedMetadata<ComponentUsageEntity> usageDetails = contentTypeService.getComponentUsageDetails(restListRequest.getFilters()[0].getValue(), restListRequest);

                    ContentTypeAssertionHelper.assertUsageDetails(usageDetails,
                            utilizers[i],
                            totalItems,
                            pageList.get(i));
                });
    }