foreignIdAndNotFilteredCriteria.setAllowFiltering(true);
indexKeys = Maps.newTreeMap();
indexKeys.put("foreignid", 123l);
indexKeys.put("filtered", 0);
foreignIdAndNotFilteredCriteria.setIndexKeys(indexKeys);
dbObjects = om.list("testtype", foreignIdAndNotFilteredCriteria);
assertEquals(1, dbObjects.size());
assertEquals(notFilteredKey, dbObjects.get(0).get("id"));
// Make sure we only get one back when searching for filtered
Criteria foreignIdAndFilteredCriteria = new Criteria();