MemoryMetaDataLoader mmdl = new MemoryMetaDataLoader();
TestAnnotation annotation = getAnnotation();
mmdl.addMetaData(annotation, TestAnnotation.class);
retrievals[1] = mmdl;
retrievals[2] = new SimpleMetaDataLoader(new Annotation[]{annotation});
ThreadLocalMetaDataLoader tlmdl = ThreadLocalMetaDataLoader.INSTANCE;
tlmdl.addAnnotation(annotation);
retrievals[3] = tlmdl;
for(MetaDataRetrieval rdr : retrievals)
assertFalse(rdr.toString(), rdr.isEmpty());
mmdl.removeMetaData(TestAnnotation.class);
assertTrue(mmdl.toString(), mmdl.isEmpty());
tlmdl.removeAnnotation(TestAnnotation.class);
assertTrue(tlmdl.toString(), tlmdl.isEmpty());
MetaDataRetrieval emptyRetrieval = new MemoryMetaDataLoader();
MetaDataContext emptyContext = new AbstractMetaDataContext(emptyRetrieval);
contexts = getMetaDataContexts(retrievals, emptyContext, emptyRetrieval);