@ParameterizedTest
    @ValueSource(strings = {
        "DefaultConfig",
        "SchemaVersion",
        "JacksonModule",
        "JavaxValidationModule",
        "JakartaValidationModule",
        "Swagger15Module",
        "Swagger2Module",
        "Complete"
    })
    public void testGeneration(String testCaseName) throws Exception {
        File testCaseLocation = new File("src/test/resources/reference-test-cases");
        File generationLocation = new File("target/generated-test-sources");

        // Execute the pom
        executePom(new File(testCaseLocation, testCaseName + "-pom.xml"));

        // Validate that the schema file is created.
        File resultFile = new File(generationLocation, testCaseName + "/TestClass-schema.json");
        Assertions.assertTrue(resultFile.exists());
        resultFile.deleteOnExit();

        // Validate that is the same as the reference
        File referenceFile = new File(testCaseLocation, testCaseName + "-reference.json");
        Assertions.assertTrue(referenceFile.exists());
        Assertions.assertTrue(FileUtils.contentEqualsIgnoreEOL(resultFile, referenceFile, CHARSET_NAME),
                "Generated schema for " + testCaseName + " is not equal to the expected reference.\n"
                        + "Generated:\n"
                        + FileUtils.readFileToString(resultFile, CHARSET_NAME)
                        + "\n----------\n"
                        + "Expected:\n"
                        + FileUtils.readFileToString(referenceFile, CHARSET_NAME));
    }
Unit that will generate from a maven pom file fragment and compare with a reference file

@throws Exception In case something goes wrong
jsonschema-maven-plugin/src/test/java/com/github/victools/jsonschema/plugin/maven/SchemaGeneratorMojoTest.java