@Test
    public void testIntegration() throws Exception {
        JacksonModule module = new JacksonModule(JacksonOption.FLATTENED_ENUMS_FROM_JSONVALUE);
        SchemaGeneratorConfig config = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_2019_09, OptionPreset.PLAIN_JSON)
                .with(Option.DEFINITIONS_FOR_ALL_OBJECTS, Option.NULLABLE_FIELDS_BY_DEFAULT)
                .with(module)
                .build();
        SchemaGenerator generator = new SchemaGenerator(config);
        JsonNode result = generator.generateSchema(TestClassForSubtypeResolution.class);

        String rawJsonSchema = result.toString();
        JSONAssert.assertEquals('\n' + rawJsonSchema + '\n',
                loadResource("subtype-integration-test-result.json"), rawJsonSchema, JSONCompareMode.STRICT);

        JsonSchema schemaForValidation = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V201909).getSchema(result);
        String jsonInstance = config.getObjectMapper().writeValueAsString(new TestClassForSubtypeResolution());

        Set<ValidationMessage> validationResult = schemaForValidation.validate(config.getObjectMapper().readTree(jsonInstance));
        if (!validationResult.isEmpty()) {
            Assertions.fail("\n" + jsonInstance + "\n  " + validationResult.stream()
                    .map(ValidationMessage::getMessage)
                    .collect(Collectors.joining("\n  ")));
        }
    }
Integration test of this module being used in a real SchemaGenerator instance, focusing on the subtype resolution.
jsonschema-module-jackson/src/test/java/com/github/victools/jsonschema/module/jackson/SubtypeResolutionIntegrationTest.java