public static void assertGeneratedSchema(JsonNode generatedSchema, Class<?> testClass, String resourcePath)
            throws IOException, JSONException {
        String schemaString = generatedSchema.toString();
        JSONAssert.assertEquals('\n' + testClass.getPackage().getName() + ": " + resourcePath + '\n' + schemaString + '\n',
                TestUtils.loadResource(testClass, resourcePath), schemaString, JSONCompareMode.STRICT);
    }
Assert that the given schema node is equal to the contents of a prepared file. In case of a mismatch, print the result and compared file name.

@param generatedSchema schema generation test result to compare
@param testClass test class requesting a file to be loaded
@param resourcePath relative path to the target file
@throws IOException when the file loading failed
@throws JSONException when the JSON comparison failed
jsonschema-generator/src/test/java/com/github/victools/jsonschema/generator/TestUtils.java