OwlapiUtils { public static Object owlLiteralToValue(final OWLLiteral literal) { return DatatypeTransformer.transform(literal); } private  OwlapiUtils(); static OWLLiteral createOWLLiteralFromValue(Object value, String lang); static Object owlLiteralToValue(final OWLLiteral literal); static boolean doesLanguageMatch(OWLLiteral literal, Assertion assertion); static String getAssertionLanguage(Assertion assertion); static OWLNamedIndividual getIndividual(NamedResource subject, OWLDataFactory dataFactory); static boolean isIndividualIri(Object value);  }
@Test void owlLiteralToValueReturnLangStringForStringLiteralWithLanguage() { final OWLLiteral literal = dataFactory.getOWLLiteral("test", LANG); final Object result = OwlapiUtils.owlLiteralToValue(literal); assertThat(result, instanceOf(LangString.class)); assertEquals("test", ((LangString) result).getValue()); assertTrue(((LangString) result).getLanguage().isPresent()); assertEquals(LANG, ((LangString) result).getLanguage().get()); }