SessionDAO sessionDAO = ((DefaultSessionManager) ((DefaultSecurityManager) sm).getSessionManager()).getSessionDAO();
assertTrue(sessionDAO instanceof EnterpriseCacheSessionDAO);
CachingSessionDAO cachingSessionDAO = (CachingSessionDAO) sessionDAO;
Cache activeSessionsCache = cachingSessionDAO.getActiveSessionsCache();
assertTrue(activeSessionsCache instanceof MapCache);
MapCache mapCache = (MapCache) activeSessionsCache;
//this is the line that verifies Caches created by our specific CacheManager are not overwritten by the
//default cache manager's caches:
assertTrue(mapCache instanceof HashMapCacheManager.HashMapCache);
}