protected EmbeddedCacheManager createCacheManager() throws Exception {
    GlobalConfiguration globalConfiguration = GlobalConfiguration.getNonClusteredDefault();
    globalConfiguration.setExposeGlobalJmxStatistics(true);
    globalConfiguration.setMBeanServerLookup(PerThreadMBeanServerLookup.class.getName());
    globalConfiguration.setJmxDomain(JMX_DOMAIN);
    cacheManager = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(globalConfiguration);

    Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.LOCAL);
    configuration.setExposeJmxStatistics(true);
    cacheManager.defineConfiguration("test", configuration);
    cache = cacheManager.getCache("test");
    advanced = cache.getAdvancedCache();
    mgmtInterceptor = getCacheObjectName(JMX_DOMAIN, "test(local)", "Statistics");

    threadMBeanServer = PerThreadMBeanServerLookup.getThreadMBeanServer();
    return cacheManager;
  }