public void init() {
        try {
            ObjectName oName = new ObjectName(this.name + ":type=" + TaskManager.class.getSimpleName());
            ManagementFactory.getPlatformMBeanServer().registerMBean(this, oName);
        } catch (Exception e) {
            LOGGER.error("registerMBean_fail", e);
        }
    }
@Test
    void testInit() throws Exception {
        taskManager.init();
        ObjectName oName = new ObjectName(TaskManagerTest.class.getName() + ":type=" + TaskManager.class.getSimpleName());
        assertTrue(ManagementFactory.getPlatformMBeanServer().isRegistered(oName));
    }