@Override
    public <T> Set<Class<T>> getSubTypesOf(String pkg, Class<T> requestClass) {
        Set<Class<T>> set = new HashSet<>(16);
        String packageSearchPath =
                ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + ClassUtils.convertClassNameToResourcePath(pkg) + '/'
                        + "**/*.class";
        try {
            Resource[] resources = resourcePatternResolver.getResources(packageSearchPath);
            for (Resource resource : resources) {
                Class<?> scanClass = getClassByResource(resource);
                if (requestClass.isAssignableFrom(scanClass)) {
                    set.add((Class<T>) scanClass);
                }
            }
        } catch (IOException | ClassNotFoundException e) {
            LOGGER.error("scan path: {} failed", packageSearchPath, e);
        }
        return set;
    }
@Test
    void testClassVersionNotMatch() throws NoSuchFieldException, IllegalAccessException, IOException {
        setResolver();
        Resource resource = mock(Resource.class);
        byte[] testCase = new byte[8];
        testCase[7] = (byte) 64;
        InputStream inputStream = new ByteArrayInputStream(testCase);
        when(resource.getInputStream()).thenReturn(inputStream);
        String path = AnnotationClass.class.getPackage().getName();
        when(pathMatchingResourcePatternResolver.getResources(anyString())).thenReturn(new Resource[] {resource});
        Set<Class<MockClass>> subTypesOf = packageScan.getSubTypesOf(path, MockClass.class);
        assertTrue(subTypesOf.isEmpty());
    }