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

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

        // Validate that the correct schema files are created.

        // TestClassA is annotated with one annotation and mentioned by classname
        File resultFileA = new File(generationLocation, "TestClassA-schema.json");
        Assertions.assertTrue(resultFileA.exists());
        resultFileA.deleteOnExit();

        // TestClassB has the correct annotation but is not mentioned by classname
        File resultFileB = new File(generationLocation, "TestClassB-schema.json");
        Assertions.assertFalse(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.");
    }
Unit test to test the generation of schemas for multiple classes bases on multiple annotations
jsonschema-maven-plugin/src/test/java/com/github/victools/jsonschema/plugin/maven/SchemaGeneratorMojoTest.java