docs: private static void unregisterMBean(String name) {
          MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
          try {
              synchronized (mbs) {
                  ObjectName objName = new ObjectName(name);
                  if (mbs.isRegistered(objName)) {
                      mbs.unregisterMBean(objName);
                  }
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
      }