@Test
public void findJobsWithCursorPagination() {

    Pair<List<Job>, List<Job>> cellSnapshots = generateTestJobs();
    List<Job> allJobs = walkAllFindJobsPages(10);
    assertThat(allJobs).hasSize(cellSnapshots.getLeft().size() + cellSnapshots.getRight().size());
    // expect stackName to have changed
    List<Job> expected = Stream.concat(cellSnapshots.getLeft().stream(), cellSnapshots.getRight().stream())
            .sorted(JobManagerCursors.jobCursorOrderComparator())
            .map(this::withStackName)
            .collect(Collectors.toList());
    assertThat(allJobs).containsExactlyElementsOf(expected);
}