    @Test
    public void testPagination() {


        int totalCount = beans().size();
        int currentPage = 6;
        int limit = 20;

        PaginationResource paginationResource = PaginationResource.newBuilder().setTotal(totalCount).setPage(currentPage).setLimit(limit).build();
        init(paginationResource);
        setItemsPerPage(10, 20, 50, 100);

        log.debug(getPaginationResource().toString());

        assertTrue("currentPage", getPaginationResource().page()==6);
        assertTrue("totalPage", getPaginationResource().totalPage()==12);
        assertTrue("limit", getPaginationResource().limit()==20);
        assertTrue("totalcount", getPaginationResource().total()==240);

        // Next Button Click
        buttonClickEvent(getPaginationResource().next());
        paginationAssert("next", 7, 120, 140);

        // Previous Button Click
        buttonClickEvent(getPaginationResource().previous());
        paginationAssert("previous", 6, 100, 120);

        // Last Button Click
        buttonClickEvent(getPaginationResource().last());
        paginationAssert("last", 12, 220, 240);

        // First Button Click
        buttonClickEvent(getPaginationResource().first());
        paginationAssert("first", 1, 0, 20);

        // CurrentPage SetValue
        setCurrentPage(10);
        currentPageChangedEvent();
        paginationAssert("currentPage", 10, 180, 200);

    }