public void onCompletition(final Object iTask, final boolean iSucceed) {
atomicInteger.incrementAndGet();
}
};
final OIndexManagerProxy indexManager = database.getMetadata().getIndexManager();
final OIndex result = indexManager.createIndex(
"compositetwo",
OClass.INDEX_TYPE.NOTUNIQUE.toString(),
new OCompositeIndexDefinition(CLASS_NAME, Arrays.asList(new OPropertyIndexDefinition(CLASS_NAME, "fOne", OType.INTEGER),
new OPropertyIndexDefinition(CLASS_NAME, "fTwo", OType.STRING), new OPropertyIndexDefinition(CLASS_NAME, "fThree",
OType.BOOLEAN)
)), new int[] { database.getClusterIdByName(CLASS_NAME) }, progressListener, null);
assertEquals(result.getName(), "compositetwo");
assertEquals(atomicInteger.get(), 2);
indexManager.reload();
assertEquals(database.getMetadata().getIndexManager().getClassIndex(CLASS_NAME, "compositetwo").getName(), result.getName());
}