@Test
    public void testDependentRequires() {
        Assertions.assertEquals(Collections.emptyList(), this.instance.resolveDependentRequires(this.field1));

        ConfigFunction<FieldScope, List<String>> resolver1 = member -> member == this.field1 ? Collections.singletonList("field2") : null;
        Assertions.assertSame(this.instance, this.instance.withDependentRequiresResolver(resolver1));
        Assertions.assertEquals(Collections.singletonList("field2"), this.instance.resolveDependentRequires(this.field1));
        Assertions.assertEquals(Collections.emptyList(), this.instance.resolveDependentRequires(this.field2));
        Assertions.assertEquals(Collections.emptyList(), this.instance.resolveDependentRequires(this.field3));

        ConfigFunction<FieldScope, List<String>> resolver2 = member -> member == this.field1 ? Collections.singletonList("field3") : null;
        Assertions.assertSame(this.instance, this.instance.withDependentRequiresResolver(resolver2));
        Assertions.assertEquals(Arrays.asList("field2", "field3"), this.instance.resolveDependentRequires(this.field1));
        Assertions.assertEquals(Collections.emptyList(), this.instance.resolveDependentRequires(this.field2));
        Assertions.assertEquals(Collections.emptyList(), this.instance.resolveDependentRequires(this.field3));

        ConfigFunction<FieldScope, List<String>> resolver3 = member -> member == this.field3
                ? Collections.emptyList() : Arrays.asList("field3", "field4");
        Assertions.assertSame(this.instance, this.instance.withDependentRequiresResolver(resolver3));
        Assertions.assertEquals(Arrays.asList("field2", "field3", "field4"), this.instance.resolveDependentRequires(this.field1));
        Assertions.assertEquals(Arrays.asList("field3", "field4"), this.instance.resolveDependentRequires(this.field2));
        Assertions.assertEquals(Collections.emptyList(), this.instance.resolveDependentRequires(this.field3));
    }
Test for the {@link SchemaGeneratorConfigPart} class.
jsonschema-generator/src/test/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfigPartTest.java