Assert.assertFalse(nickIndex.contains("NonProxiedObjectToDelete"));
}
@Test(dependsOnMethods = "testIndexRebuildDuringNonProxiedObjectDelete")
public void testIndexRebuildDuringDetachAllNonProxiedObjectDelete() {
Profile profile = new Profile("NonProxiedObjectToDelete", "NonProxiedObjectToDelete", "NonProxiedObjectToDelete", null);
profile = database.save(profile);
OIndexManager idxManager = database.getMetadata().getIndexManager();
OIndex<?> nickIndex = idxManager.getIndex("Profile.nick");
Assert.assertTrue(nickIndex.contains("NonProxiedObjectToDelete"));
final Profile loadedProfile = database.load(new ORecordId(profile.getId()));
database.delete(database.detachAll(loadedProfile, true));
Assert.assertFalse(nickIndex.contains("NonProxiedObjectToDelete"));
}