map.put(i, i - size);
}
final Predicate lessEqual = Predicates.lessEqual("this", 8); // entries which has value less than 8
final TestComparator comparator = new TestComparator(true, IterationType.VALUE); //ascending values
final PagingPredicate predicate = new PagingPredicate(lessEqual, comparator, pageSize); //pageSize = 5
Collection<Integer> values = map.values(predicate);
assertIterableEquals(values, 0, 0, 1, 1, 2);
predicate.nextPage();
values = map.values(predicate);
assertIterableEquals(values, 2, 3, 3, 4, 4);
predicate.nextPage();
values = map.values(predicate);
assertIterableEquals(values, 5, 5, 6, 6, 7);
predicate.nextPage();
values = map.values(predicate);
assertIterableEquals(values, 7, 8, 8);
}