@Test
public void pageableTest() {

    List list = new ArrayList<>();
    for (int i=1; i<=1240; i++) {
        list.add(String.valueOf(i));
    }
    Pageable pageable = new Pageable(100, list);
    Assert.assertEquals(1, pageable.getCurrentPage());
    Assert.assertEquals(13, pageable.getTotalPages());
    Assert.assertEquals(100, pageable.getPageSize());
    Assert.assertTrue(pageable.hasMorePages());
    Assert.assertFalse(pageable.isPaginationComplete());
    for (int i=1; i<=13; i++) {
        if (i <= 12) {
            Assert.assertEquals(100, pageable.getPaginatedList().size());
            Assert.assertTrue(pageable.hasMorePages());
        } else if (i == 13) {
            Assert.assertEquals(40, pageable.getPaginatedList().size());
            Assert.assertFalse(pageable.hasMorePages());
        }
        Assert.assertEquals(i, pageable.getCurrentPage());
        pageable.nextPage();
        if (i <= 12) {
            Assert.assertFalse(pageable.isPaginationComplete());
        } else if (i == 13) {
            Assert.assertTrue(pageable.isPaginationComplete());
        }
    }
}