realms.clear();
realms.add(SimpleAccountRealm.class.getName());
securitySystem.setRealms(realms);
// now if we grab one of the realms from the Realm locator, it should have its cache set
CachingRealm cRealm1 = (CachingRealm) plexusSecurityManager.getRealms().iterator().next();
Assert.assertNotNull("Realm has null cacheManager", cRealm1.getCacheManager());
// // so far so good, the cacheManager should be set on all the child realms, but what if we add one after the
// init method?
realms.add(SimpleAccountRealm.class.getName());
securitySystem.setRealms(realms);