public static ClassPool getClassPool(ClassLoader loader) {
        if (loader == null) {
            return ClassPool.getDefault();
        }

        ClassPool pool = POOL_MAP.get(loader);
        if (pool == null) {
            synchronized (POOL_MAP) {
                pool = POOL_MAP.get(loader);
                if (pool == null) {
                    pool = new ClassPool(true);
                    pool.insertClassPath(new LoaderClassPath(loader));
                    pool.insertClassPath(new DubboLoaderClassPath());
                    POOL_MAP.put(loader, pool);
                }
            }
        }
        return pool;
    }
@Test
    public void test_getClassPool() throws InterruptedException {
        int threadCount = 5;
        CountDownLatch LATCH = new CountDownLatch(threadCount);
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        List<Integer> hashCodeList = new ArrayList<>();
        for (int i = 0; i < threadCount; i++) {
            new Thread(new Runnable() {
                        @Override
                        public void run() {
                            ClassPool classPool = ClassGenerator.getClassPool(loader);
                            int currentHashCode = classPool.hashCode();
                            hashCodeList.add(currentHashCode);
                            System.out.println(currentHashCode);
                            LATCH.countDown();
                        }
                    })
                    .start();
        }
        LATCH.await();
        Integer firstHashCode = null;
        for (Integer currentHashCode : hashCodeList) {
            if (firstHashCode == null) {
                firstHashCode = currentHashCode;
                continue;
            }
            Assertions.assertTrue(firstHashCode.intValue() == currentHashCode.intValue());
        }
    }