boolean exist = false;
Map<Index, IndexState> indexes = service.getIndexes();
assertTrue(indexes.size() > 0);
for (Map.Entry<Index, IndexState> entry : indexes.entrySet()) {
Index index = entry.getKey();
if (index.getKind().equals("indextest2")) {
exist = true;
assertEquals(Index.IndexState.SERVING, entry.getValue());
for (Property property : index.getProperties()) {
if (property.getName().equals("stringData")) {
assertEquals(Query.SortDirection.DESCENDING, property.getDirection());
} else if (property.getName().equals("age")) {
assertEquals(Query.SortDirection.ASCENDING, property.getDirection());
}