// expected
}
}
public void testQueryPaging() {
FilterQuery query = filterService.createFilterQuery();
assertEquals(4, query.listPage(0, Integer.MAX_VALUE).size());
// Verifying the un-paged results
assertEquals(4, query.count());
assertEquals(4, query.list().size());
// Verifying paged results
assertEquals(2, query.listPage(0, 2).size());
assertEquals(2, query.listPage(2, 2).size());
assertEquals(1, query.listPage(3, 1).size());
// Verifying odd usages
assertEquals(0, query.listPage(-1, -1).size());
assertEquals(0, query.listPage(4, 2).size()); // 4 is the last index with a result
assertEquals(4, query.listPage(0, 15).size()); // there are only 4 tasks
}