@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://mobi.com/dataset/" + ResourceUtils.encode(key1)), false)) {
        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://mobi.com/dataset/" + ResourceUtils.encode(key2)), false)) {
        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);
    }
}