public void testAddMetaDataRetrievalFactory() throws Exception
{
MutableMetaDataRepository repository = setupEmpty();
assertNull(repository.getMetaDataRetrievalFactory(testLevel1));
TestMetaDataRetrievalFactory factory1 = new TestMetaDataRetrievalFactory();
assertNull(repository.addMetaDataRetrievalFactory(testLevel1, factory1));
assertEquals(factory1, repository.getMetaDataRetrievalFactory(testLevel1));
TestMetaDataRetrievalFactory factory2 = new TestMetaDataRetrievalFactory();
assertEquals(factory1, repository.addMetaDataRetrievalFactory(testLevel1, factory2));
assertEquals(factory2, repository.getMetaDataRetrievalFactory(testLevel1));
TestMetaDataRetrievalFactory factory3 = new TestMetaDataRetrievalFactory();
assertNull(repository.addMetaDataRetrievalFactory(testLevel2, factory3));
assertEquals(factory2, repository.getMetaDataRetrievalFactory(testLevel1));
assertEquals(factory3, repository.getMetaDataRetrievalFactory(testLevel2));
}