CacheManager cacheManager =
EHCacheManagerHolder.getCacheManager("testCache2",
EHCacheManagerHolder.class.getResource("/test-ehcache2.xml"));
String key = "org.apache.wss4j.TokenStore";
CacheConfiguration cacheConfig =
EHCacheManagerHolder.getCacheConfiguration(key, cacheManager);
assertEquals(3600, cacheConfig.getTimeToIdleSeconds());
key = "org.apache.wss4j.TokenStore-{http://ws.apache.org}wss4j";
CacheConfiguration cacheConfig2 =
EHCacheManagerHolder.getCacheConfiguration(key, cacheManager);
assertEquals(360000, cacheConfig2.getTimeToIdleSeconds());
key = "org.apache.wss4j.TokenStore-{http://ws.apache.org}wss4junknown";
CacheConfiguration cacheConfig3 =
EHCacheManagerHolder.getCacheConfiguration(key, cacheManager);
assertEquals(3600, cacheConfig3.getTimeToIdleSeconds());
}