docs: public static <K, V> void unregisterCacheObject(AbstractJCache<K, V> cache, ObjectNameType objectNameType) {
        Set<ObjectName> registeredObjectNames;
        MBeanServer mBeanServer = cache.getMBeanServer();
  
        if (mBeanServer != null) {
           ObjectName objectName = calculateObjectName(cache, objectNameType);
           registeredObjectNames = SecurityActions.queryNames(objectName, null, mBeanServer);
  
           //should just be one
           for (ObjectName registeredObjectName : registeredObjectNames) {
              try {
                 SecurityActions.unregisterMBean(registeredObjectName, mBeanServer);
              } catch (Exception e) {
                 throw new CacheException("Error unregistering object instance "
                       + registeredObjectName + " . Error was " + e.getMessage(), e);
              }
           }
        }
     }