FieldMappingValidator { void validateAnnotationPropertyField(Field field, OWLAnnotationProperty config) { assert field != null; assert config != null; validateLexicalFormField(field, config.lexicalForm()); validateSimpleLiteralField(field, config.simpleLiteral()); }    }
@Test void validateAnnotationPropertyFieldInvokesLexicalFormValidation() { assertThrows(InvalidFieldMappingException.class, () -> validator.validateAnnotationPropertyField(getField("invalidLexicalFormAnnotation"), getField("invalidLexicalFormAnnotation").getAnnotation(OWLAnnotationProperty.class))); }
@Test void simpleLiteralAnnotationThrowsInvalidFieldMappingExceptionOnNonStringAnnotationPropertyField() { assertThrows(InvalidFieldMappingException.class, () -> validator.validateAnnotationPropertyField(getField("invalidSimpleLiteralAnnotation"), getField("invalidSimpleLiteralAnnotation").getAnnotation(OWLAnnotationProperty.class))); }
@Test void simpleLiteralAnnotationIsValidOnSetStringField() throws Exception { validator.validateAnnotationPropertyField(getField("validSimpleLiteralSet"), getField("validSimpleLiteralSet").getAnnotation(OWLAnnotationProperty.class)); }