@SuppressWarnings("javadoc")
public class UntranslatableAxiomsInHeaderTest extends OboFormatTestBasics {
@Test
public void testUntranslatableAxioms() throws Exception {
OWLOntology original = parseOWLFile("untranslatable_axioms.owl");
OWLAPIOwl2Obo owl2Obo = new OWLAPIOwl2Obo(
OWLManager.createOWLOntologyManager());
OBODoc obo = owl2Obo.convert(original);
renderOboToString(obo);
Frame headerFrame = obo.getHeaderFrame();
String owlAxiomString = headerFrame.getTagValue(
OboFormatTag.TAG_OWL_AXIOMS, String.class);
assertNotNull(owlAxiomString);
OWLAPIObo2Owl obo2Owl = new OWLAPIObo2Owl(
OWLManager.createOWLOntologyManager());
OWLOntology converted = obo2Owl.convert(obo);
Set<OWLEquivalentClassesAxiom> originalEqAxioms = original
.getAxioms(AxiomType.EQUIVALENT_CLASSES);
Set<OWLEquivalentClassesAxiom> convertedEqAxioms = converted
.getAxioms(AxiomType.EQUIVALENT_CLASSES);
assertEquals(originalEqAxioms.size(), convertedEqAxioms.size());
assertTrue(originalEqAxioms.containsAll(convertedEqAxioms));
assertTrue(convertedEqAxioms.containsAll(originalEqAxioms));
}