public void shouldSortResultsGivenMultipleSortCriteria() {
// given
List<IndexQuery> indexQueries = new ArrayList<IndexQuery>();
// first document
String documentId = randomNumeric(5);
SampleEntity sampleEntity1 = new SampleEntityBuilder(documentId)
.message("abc")
.rate(10)
.version(System.currentTimeMillis()).build();
// second document
String documentId2 = randomNumeric(5);
SampleEntity sampleEntity2 = new SampleEntityBuilder(documentId2)
.message("xyz")
.rate(5)
.version(System.currentTimeMillis()).build();
// third document
String documentId3 = randomNumeric(5);
SampleEntity sampleEntity3 = new SampleEntityBuilder(documentId3)
.message("xyz")
.rate(15)
.version(System.currentTimeMillis()).build();
indexQueries = getIndexQueries(Arrays.asList(sampleEntity1, sampleEntity2, sampleEntity3));