@BeforeEach
    public void setUp() {
        SchemaVersion schemaVersion = SchemaVersion.DRAFT_2019_09;
        this.prepareContextForVersion(schemaVersion);

        SchemaGeneratorConfig config = Mockito.mock(SchemaGeneratorConfig.class);
        Mockito.when(config.getSchemaVersion()).thenReturn(schemaVersion);
        Mockito.when(config.getKeyword(Mockito.any()))
                .thenAnswer(invocation -> ((SchemaKeyword) invocation.getArgument(0)).forVersion(schemaVersion));
        Mockito.when(config.resolveTitle(Mockito.any(FieldScope.class))).thenReturn("Field Title");
        Mockito.when(config.resolveTitle(Mockito.any(MethodScope.class))).thenReturn("Method Title");
        Mockito.when(config.resolveDescriptionForType(Mockito.any())).thenReturn("Type Description");
        Mockito.when(config.resolveDependentRequires(Mockito.any(FieldScope.class))).thenReturn(Collections.singletonList("isBooleanField()"));
        Mockito.when(config.resolveDependentRequires(Mockito.any(MethodScope.class))).thenReturn(Collections.singletonList("booleanField"));
        Mockito.when(config.resolveStringMinLength(Mockito.any(FieldScope.class))).thenReturn(null);
        Mockito.when(config.resolveStringMaxLength(Mockito.any(FieldScope.class))).thenReturn(null);
        Mockito.when(config.resolveArrayMinItems(Mockito.any(FieldScope.class))).thenReturn(null);
        Mockito.when(config.resolveArrayMaxItems(Mockito.any(FieldScope.class))).thenReturn(null);
        Mockito.when(config.resolveArrayUniqueItems(Mockito.any(FieldScope.class))).thenReturn(null);
        Mockito.when(config.resolveStringMinLength(Mockito.any(MethodScope.class))).thenReturn(null);
        Mockito.when(config.resolveStringMaxLength(Mockito.any(MethodScope.class))).thenReturn(null);
        Mockito.when(config.resolveArrayMinItems(Mockito.any(MethodScope.class))).thenReturn(null);
        Mockito.when(config.resolveArrayMaxItems(Mockito.any(MethodScope.class))).thenReturn(null);
        Mockito.when(config.resolveArrayUniqueItems(Mockito.any(MethodScope.class))).thenReturn(null);
        Mockito.when(config.resolveStringMinLengthForType(Mockito.any())).thenReturn(null);
        Mockito.when(config.resolveStringMaxLengthForType(Mockito.any())).thenReturn(null);
        Mockito.when(config.resolveArrayMinItemsForType(Mockito.any())).thenReturn(null);
        Mockito.when(config.resolveArrayMaxItemsForType(Mockito.any())).thenReturn(null);
        Mockito.when(config.resolveArrayUniqueItemsForType(Mockito.any())).thenReturn(null);

        ObjectMapper objectMapper = new ObjectMapper();
        Mockito.when(config.createObjectNode()).then(_invocation -> objectMapper.createObjectNode());
        Mockito.when(config.createArrayNode()).then(_invocation -> objectMapper.createArrayNode());

        this.contextImpl = new SchemaGenerationContextImpl(config, this.getContext().getTypeContext());
    }
Test for the {@link SchemaGenerationContextImpl} class.
jsonschema-generator/src/test/java/com/github/victools/jsonschema/generator/impl/SchemaGenerationContextImplTest.java