default Collection<Class> findSubclassesInPackage(final Class superClass, final String... packages) {
        val results = (Collection<Class>) ReflectionUtils.findSubclassesInPackage(superClass, packages);
        val filteredResults = results
            .stream()
            .filter(clazz -> {
                var host = clazz.getCanonicalName();
                if (clazz.isMemberClass() && clazz.getPackageName().startsWith("org.apereo.cas")) {
                    var entry = clazz;
                    while (entry.isMemberClass()) {
                        entry = clazz.getNestHost();
                    }
                    host = entry.getCanonicalName();
                }
                return StringUtils.isNotBlank(host) && !host.endsWith("Tests");
            })
            .collect(Collectors.toList());
        filteredResults.add(superClass);
        return filteredResults;
    }
Find subclasses in packages and exclude tests.

@param superClass the parent class
@param packages   the packages
@return the collection
api/cas-server-core-api-util/src/main/java/org/apereo/cas/util/nativex/CasRuntimeHintsRegistrar.java