### Question:
OntologyRepositoryCache extends AbstractDatasetRepositoryCache<String, Ontology> { @Override public void putAll(Map<? extends String, ? extends Ontology> map) { map.forEach(this::put); } OntologyRepositoryCache(String name, Repository repository, CacheManager cacheManager,
                                   Configuration configuration); void setOntologyManager(OntologyManager ontologyManager); void setValueFactory(ValueFactory vf); void setModelFactory(ModelFactory mf); void setDatasetFactory(DatasetFactory datasetFactory); void setDatasetManager(DatasetManager datasetManager); @Override Ontology get(String key); @Override Map<String, Ontology> getAll(Set<? extends String> keys); @Override boolean containsKey(String key); @Override void loadAll(Set<? extends String> keys, boolean replaceExistingValues,
                        CompletionListener completionListener); @Override void put(String key, Ontology ontology); @Override Ontology getAndPut(String key, Ontology ontology); @Override void putAll(Map<? extends String, ? extends Ontology> map); @Override boolean putIfAbsent(String key, Ontology ontology); @Override boolean remove(String key); @Override boolean remove(String key, Ontology ontology); @Override Ontology getAndRemove(String key); @Override boolean replace(String key, Ontology ontology, Ontology newOntology); @Override boolean replace(String key, Ontology ontology); @Override Ontology getAndReplace(String key, Ontology ontology); @Override void removeAll(Set<? extends String> set); @Override void removeAll(); @Override void clear(); @Override C getConfiguration(Class<C> clazz); @Override T invoke(String key, EntryProcessor<String, Ontology, T> entryProcessor, Object... objects); @Override Map<String, EntryProcessorResult<T>> invokeAll(Set<? extends String> set,
                                                              EntryProcessor<String, Ontology, T> entryProcessor,
                                                              Object... objects); @Override String getName(); @Override CacheManager getCacheManager(); @Override void close(); @Override boolean isClosed(); @Override T unwrap(Class<T> clazz); @Override void registerCacheEntryListener(CacheEntryListenerConfiguration<String,
            Ontology> cacheEntryListenerConfiguration); @Override void deregisterCacheEntryListener(CacheEntryListenerConfiguration<String,
            Ontology> cacheEntryListenerConfiguration); @Override Iterator<Cache.Entry<String, Ontology>> iterator();  }### Answer:
@Test public void putAllTest() { Map<String, Ontology> map = Stream.of(new Object[][] { {key1, ontNoImports}, {key2, ontOneImport} }).collect(Collectors.toMap(x -> (String) x[0], x -> (Ontology) x[1])); cache.putAll(map); try (DatasetConnection dc = cache.getDatasetConnection(vf.createIRI("http: RepositoryResult<Statement> statements = dc.getStatements(null, null, null, dc.getSystemDefaultNamedGraph()); Model ontologyModel = RepositoryResults.asModelNoContext(statements, mf); assertEquals(ontologyModel.size(), ontNoImportsModel.size()); assertEquals(ontologyModel, ontNoImportsModel); } try (DatasetConnection dc = cache.getDatasetConnection(vf.createIRI("http: RepositoryResult<Statement> statements = dc.getStatements(null, null, null, dc.getSystemDefaultNamedGraph()); Model ontologyModel = RepositoryResults.asModelNoContext(statements, mf); assertEquals(ontologyModel.size(), ontOneImportModel.size()); assertEquals(ontologyModel, ontOneImportModel); statements = dc.getStatements(null, null, null, import1SdNgIRI); ontologyModel = RepositoryResults.asModelNoContext(statements, mf); assertEquals(ontologyModel.size(), import1Model.size()); assertEquals(ontologyModel, import1Model); } }