@Nonnull
File f = folder.newFile("a.owl");
createOntologyFile(IRI("http://a.com"), f);
// have to load an ontology for it to get a document IRI
OWLOntology a = m.loadOntologyFromOntologyDocument(f);
IRI locA = m.getOntologyDocumentIRI(a);
IRI bIRI = IRI("http://b.com");
OWLOntology b = m.createOntology(bIRI);
// import from the document location of a.owl (rather than the
// ontology IRI)
m.applyChange(new AddImport(b, df.getOWLImportsDeclaration(locA)));
assertEquals(1, b.getImportsDeclarations().size());