FetchOptions fetchOption = FetchOptions.Builder.withLimit(limit);
if (stCursor != null) {
fetchOption = fetchOption.startCursor(stCursor);
}
if (endCursor != null) {
fetchOption = fetchOption.endCursor(endCursor);
}
QueryResultList<Entity> nextBatch = service.prepare(query)
.asQueryResultList(fetchOption);
assertEquals(exptRet, nextBatch.size());
if (chkSt != null) {