@ParameterizedTest
    @MethodSource("parametersForTestFindGetterField")
    public void testFindGetterField(String methodName, String methodNameOverride, String fieldName) throws Exception {
        MethodScope method = this.getTestClassMethod(methodName)
                .withOverriddenName(methodNameOverride);
        FieldScope field = method.findGetterField();

        if (fieldName == null) {
            Assertions.assertNull(field);
        } else {
            Assertions.assertNotNull(field);
            Assertions.assertEquals(fieldName, field.getDeclaredName());
        }
    }
Test for the {@link MethodScope} class.
jsonschema-generator/src/test/java/com/github/victools/jsonschema/generator/MethodScopeTest.java