// fetch 1st page and get cursor1
QueryResultList<Entity> nextBatch = service.prepare(query)
.asQueryResultList(fetchOption);
Cursor cursor1 = Cursor.fromWebSafeString(nextBatch.getCursor().toWebSafeString());
// fetch 2nd page and get cursor2
nextBatch = service.prepare(query).asQueryResultList(fetchOption.startCursor(cursor1));
Cursor cursor2 = Cursor.fromWebSafeString(nextBatch.getCursor().toWebSafeString());
// cursor1 as start and cursor2 as end and 15 in limit -- -- should return 2nd page.
checkPage(query, cursor1, cursor2, limit, limit, testDat[1], testDat[1]);
// cursor1 as start and cursor2 as end and 30 in limit -- should return 2nd page.
checkPage(query, cursor1, cursor2, 2 * limit, limit, testDat[1], testDat[1]);