private static void checkCasTestExtension(final String arg, final Pattern... patternBootTestClasses) throws Exception {
        var failBuild = new AtomicBoolean(false);
        Files.walk(Paths.get(arg))
            .filter(file -> Files.isRegularFile(file) && file.toFile().getName().endsWith("Tests.java"))
            .forEach(file -> {
                var text = readFile(file);
                Arrays.stream(patternBootTestClasses)
                    .forEach(pattern -> {
                        var matcher = pattern.matcher(text);
                        if (matcher.find() && !text.contains("CasTestExtension")) {
                            print("Class %s must be annotated with @ExtendWith(CasTestExtension.class)", file.toFile().getName());
                            failBuild.set(true);
                        }
                    });
            });
        if (failBuild.get()) {
            System.exit(1);
        }
    }
This is {@link CheckRedundantTestConfigurationInheritance}.

@author Misagh Moayyed
@since 6.3.0
ci/checks/CheckRedundantTestConfigurationInheritance.java