public static ConnectionGroup getOrCreateGroup(String namespace) {
        AssertUtil.assertNotBlank(namespace, "namespace should not be empty");
        ConnectionGroup group = CONN_MAP.get(namespace);
        if (group == null) {
            synchronized (CREATE_LOCK) {
                if ((group = CONN_MAP.get(namespace)) == null) {
                    group = new ConnectionGroup(namespace);
                    CONN_MAP.put(namespace, group);
                }
            }
        }
        return group;
    }
@Test
    public void testGetOrCreateGroupMultipleThread() throws Exception {
        final String namespace = "test-namespace";
        int threadCount = 32;
        final List<ConnectionGroup> groups = new CopyOnWriteArrayList<>();
        final CountDownLatch latch = new CountDownLatch(threadCount);
        for (int i = 0; i < threadCount; i++) {
            new Thread(new Runnable() {
                @Override
                public void run() {
                    groups.add(ConnectionManager.getOrCreateGroup(namespace));
                    latch.countDown();
                }
            }).start();
        }
        latch.await();
        for (int i = 1; i < groups.size(); i++) {
            assertSame(groups.get(i - 1).getNamespace(), groups.get(i).getNamespace());
        }
    }