searchService.saveToIndex(entry1);
SearchEntry entry2 = builder.path("item2").title("Item 2").build();
searchService.saveToIndex(entry2);
Pageable page1 = new PageRequest(0, 1);
Page<SearchResult> searchEntries1 =
searchService.search("content", page1, Collections.<String> emptyList()).getPage();
assertThat(searchEntries1.getContent().get(0).getId(), equalTo(entry1.getId()));
Pageable page2 = new PageRequest(1, 1);
Page<SearchResult> searchEntries2 =
searchService.search("content", page2, Collections.<String> emptyList()).getPage();
assertThat(searchEntries2.getContent().get(0).getId(), equalTo(entry2.getId()));
}