@Test
    public void testTwoClasses() throws Exception {
        File testCaseLocation = new File("src/test/resources/reference-test-cases");
        File generationLocation = new File("target/generated-test-sources/TwoClasses");

        // Execute the pom
        executePom(new File("src/test/resources/reference-test-cases/TwoClasses-pom.xml"));

        // Validate that the schema files are created.
        File resultFileA = new File(generationLocation,"TestClassA.schema");
        Assertions.assertTrue(resultFileA.exists());
        resultFileA.deleteOnExit();

        File resultFileB = new File(generationLocation,"TestClassB.schema");
        Assertions.assertTrue(resultFileB.exists());
        resultFileB.deleteOnExit();

        // Validate that they are the same as the reference
        File referenceFileA = new File(testCaseLocation, "TestClassA-reference.json");
        Assertions.assertTrue(referenceFileA.exists());
        Assertions.assertTrue(FileUtils.contentEqualsIgnoreEOL(resultFileA, referenceFileA, CHARSET_NAME),
                "Generated schema for TestClassA is not equal to the expected reference.");

        File referenceFileB = new File(testCaseLocation, "TestClassB-reference.json");
        Assertions.assertTrue(referenceFileB.exists());
        Assertions.assertTrue(FileUtils.contentEqualsIgnoreEOL(resultFileB, referenceFileB, CHARSET_NAME),
                "Generated schema for TestClassB is not equal to the expected reference.");
    }
Unit test to test the generation of schemas for multiple classes
jsonschema-maven-plugin/src/test/java/com/github/victools/jsonschema/plugin/maven/SchemaGeneratorMojoTest.java