private void modularityTest(OWLOntology ontology, Set<OWLEntity> signature, ModuleType moduleType) throws OWLException {
Set<OWLAxiom> computed = ModularityUtils.extractModule( ontology, signature, moduleType );
OntologySegmenter segmenter =
new SyntacticLocalityModuleExtractor( OWL.manager, ontology, moduleType );
Set<OWLAxiom> expected = segmenter.extract( signature );
// prune declarations to avoid mismatches related to declarations
for( OWLEntity entity : signature ) {
OWLDeclarationAxiom declaration = OWL.declaration( entity );
computed.remove( declaration );