result = om.getByKey(objectType, id);
assertEquals("0", result.get("value"));
assertNull(result.get("index_2"));
//Query back the data by first index
Criteria criteria = new Criteria();
SortedMap<String, Object> indexKeys = new TreeMap<String, Object>();
indexKeys.put("index_1", "value1");
criteria.setIndexKeys(indexKeys);
criteria.setOrdering("DESC");
criteria.setLimit(50l);
List<Map<String, Object>> dbObjects = om.list(objectType, criteria);
assertEquals(1, dbObjects.size());
assertEquals(null, dbObjects.get(0).get("index_2"));
//Query back the data by second index
criteria = new Criteria();
indexKeys = new TreeMap<String, Object>();
indexKeys.put("index_2", "value2");
criteria.setIndexKeys(indexKeys);
criteria.setOrdering("DESC");
criteria.setLimit(50l);
dbObjects = om.list(objectType, criteria);
assertEquals(0, dbObjects.size());
cm.teardown();
}