public void test_aboutToIndex_shouldRemoveSourceKeys() throws Exception { store.recordRelationship(elementA, relationship, location); // notify that we are going to re-index "A" store.aboutToIndex(contextA, unitElementA); // all keys in "A" should be removed (and we don't have any other sources) assertEquals(0, store.internalGetSourceKeyCount(contextA)); }