testCRUD(objectRegistry);
}
@Test
public void testClearCache() {
ObjectRegistry objectRegistry = new ObjectRegistryImpl();
testCRUD(objectRegistry);
String one = "one";
String two = "two";
objectRegistry.cacheForVertex(one, one);
objectRegistry.cacheForDAG(two, two);
((ObjectRegistryImpl)objectRegistry).clearCache(ObjectRegistryImpl.ObjectLifeCycle.VERTEX);
Assert.assertNull(objectRegistry.get(one));
Assert.assertNotNull(objectRegistry.get(two));
objectRegistry.cacheForVertex(one, one);
((ObjectRegistryImpl)objectRegistry).clearCache(ObjectRegistryImpl.ObjectLifeCycle.DAG);
Assert.assertNotNull(objectRegistry.get(one));
Assert.assertNull(objectRegistry.get(two));
}