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

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

        // Validate that the correct schema files are created.

        // TestClassA is annotated with the wrong annotation
        File resultFileA = new File(generationLocation, "TestClassA-schema.json");
        Assertions.assertFalse(resultFileA.exists());
        resultFileA.deleteOnExit();

        // TestClassB has the correct annotation
        File resultFileB = new File(generationLocation, "TestClassB-schema.json");
        Assertions.assertTrue(resultFileB.exists());
        resultFileB.deleteOnExit();

        // Validate that they are the same as the 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 bases on annotations
jsonschema-maven-plugin/src/test/java/com/github/victools/jsonschema/plugin/maven/SchemaGeneratorMojoTest.java