{
String rootStr = "/org/jboss/test/data/";
LRUAlgorithmConfig cfg = (LRUAlgorithmConfig) cache3.getConfiguration().getEvictionConfig().getEvictionRegionConfig(rootStr).getEvictionAlgorithmConfig();
cfg.setMaxAge(60, TimeUnit.SECONDS);
cfg.setTimeToLive(360, TimeUnit.SECONDS);
EvictionWatcher ew = new EvictionWatcher(cache1, Fqn.fromString(rootStr + 3));
for (int i = 0; i < 10; i++)
{
String str = rootStr + i;
Fqn fqn = Fqn.fromString(str);
cache1.put(fqn, str, str);
}
String str = rootStr + "7";
Fqn fqn = Fqn.fromString(str);
cache1.get(fqn, str);
assert ew.waitForEviction(30, TimeUnit.SECONDS);
String val = (String) cache1.get(rootStr + "3", rootStr + "3");
assertNull("DataNode should be empty ", val);
val = (String) cache3.get(rootStr + "7", rootStr + "7");
assertNotNull("DataNode should not be null", val);