protected EmbeddedCacheManager createCacheManager() throws Exception {
    GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
    gc.setAsyncTransportExecutorFactoryClass(WTE.class.getName());
    cacheManager = TestCacheManagerFactory.createCacheManager(gc);

    cacheManager.defineConfiguration(LOCAL_CACHE_NAME, getBaseCfg());

    cacheManager.defineConfiguration(REPL_SYNC_CACHE_NAME, getClusteredCfg(REPL_SYNC, false));
    cacheManager.defineConfiguration(REPL_ASYNC_CACHE_NAME, getClusteredCfg(REPL_ASYNC, false));
    cacheManager.defineConfiguration(DIST_SYNC_CACHE_NAME, getClusteredCfg(DIST_SYNC, false));
    cacheManager.defineConfiguration(DIST_ASYNC_CACHE_NAME, getClusteredCfg(DIST_ASYNC, false));
    cacheManager.defineConfiguration(DIST_SYNC_L1_CACHE_NAME, getClusteredCfg(DIST_SYNC, true));
    cacheManager.defineConfiguration(DIST_ASYNC_L1_CACHE_NAME, getClusteredCfg(DIST_ASYNC, true));

    return cacheManager;
  }