FieldMappingValidator { void validateDataPropertyField(Field field, OWLDataProperty config) { assert field != null; assert config != null; validateLexicalFormField(field, config.lexicalForm()); validateSimpleLiteralField(field, config.simpleLiteral()); }    }
@Test void lexicalFormAnnotationIsValidOnStringField() throws Exception { validator.validateDataPropertyField(OWLClassM.getLexicalFormField(), OWLClassM.getLexicalFormField().getAnnotation(OWLDataProperty.class)); }
@Test void validateDataPropertyFieldInvokesLexicalFormValidation() { assertThrows(InvalidFieldMappingException.class, () -> validator.validateDataPropertyField(getField("invalidLexicalForm"), getField("invalidLexicalForm").getAnnotation(OWLDataProperty.class))); }
@Test void simpleLiteralAnnotationIsValidOnStringField() throws Exception { validator.validateDataPropertyField(OWLClassM.getSimpleLiteralField(), OWLClassM.getSimpleLiteralField().getAnnotation(OWLDataProperty.class)); }
@Test void simpleLiteralAnnotationThrowsInvalidFieldMappingExceptionOnNonStringField() { assertThrows(InvalidFieldMappingException.class, () -> validator.validateDataPropertyField(getField("invalidSimpleLiteral"), getField("invalidSimpleLiteral").getAnnotation(OWLDataProperty.class))); }
@Test void lexicalFormDataPropertyIsValidOnListStringFields() throws Exception { validator.validateDataPropertyField(getField("validLexicalFormList"), getField("validLexicalFormList").getAnnotation(OWLDataProperty.class)); }