public void testCountFunctionWithNotUniqueIndex() {
long oldIndexUsage = profiler.getCounter("db.demo.query.indexUsed");
long oldcompositeIndexUsed = profiler.getCounter("db.demo.query.compositeIndexUsed");
OClass klazz = database.getMetadata().getSchema().getOrCreateClass("CountFunctionWithNotUniqueHashIndex");
if (!klazz.existsProperty("a")) {
klazz.createProperty("a", OType.STRING);
klazz.createIndex("CountFunctionWithNotUniqueHashIndex_A", "NOTUNIQUE_HASH_INDEX", "a");
}
ODocument doc = database.newInstance("CountFunctionWithNotUniqueHashIndex").field("a", "a").field("b", "b").save();