public void register(String tenantId, String group, ExecutorService executor) {
        if (!resourcesManager.containsKey(tenantId)) {
            synchronized (this) {
                lockers.put(tenantId, new Object());
            }
        }
        final Object monitor = lockers.get(tenantId);
        synchronized (monitor) {
            Map<String, Set<ExecutorService>> map = resourcesManager.get(tenantId);
            if (map == null) {
                map = new HashMap();
                map.put(group, new HashSet());
                map.get(group).add(executor);
                resourcesManager.put(tenantId, map);
                return;
            }
            if (!map.containsKey(group)) {
                map.put(group, new HashSet());
            }
            map.get(group).add(executor);
        }
    }
@Test
    public void register() {
        ThreadPoolManager poolManager = ThreadPoolManager.getInstance();
        poolManager.register(schedule, schedule, executorService1);
        poolManager.register(schedule, schedule, executorService2);
        poolManager.register(executor, executor, executorService3);
        poolManager.register(executor, executor, executorService4);

        Map<String, Map<String, Set<ExecutorService>>> manager = (Map<String, Map<String, Set<ExecutorService>>>) ReflectUtil.getFieldValue(poolManager, "resourcesManager");

        Map<String, Set<ExecutorService>> scheduleMap = manager.get(schedule);
        Assert.assertEquals(1, scheduleMap.size());
        Set<ExecutorService> scheduleSet = scheduleMap.get(schedule);
        Assert.assertEquals(2, scheduleSet.size());

        Map<String, Set<ExecutorService>> executorMap = manager.get(executor);
        Assert.assertEquals(1, executorMap.size());
        Set<ExecutorService> executorSet = executorMap.get(executor);
        Assert.assertEquals(2, executorSet.size());
    }