@ParameterizedTest
    @CsvSource({
        "fieldWithoutGetter, false",
        "fieldWithPrivateGetter, true",
        "fieldWithPublicGetter, false",
        "fieldWithPublicBooleanGetter, true"
    })
    public void testGetAnnotationConsideringFieldAndGetter(String fieldName, boolean annotationExpectedToBeFound) {
        FieldScope field = this.getTestClassField(fieldName);
        TestAnnotation annotation = field.getAnnotationConsideringFieldAndGetter(TestAnnotation.class);

        if (annotationExpectedToBeFound) {
            Assertions.assertNotNull(annotation);
        } else {
            Assertions.assertNull(annotation);
        }
    }
Test for the {@link FieldScope} class.
jsonschema-generator/src/test/java/com/github/victools/jsonschema/generator/FieldScopeTest.java