CacheStore cache = new CacheStore(limit, 1 * 1024 * 1024, 1);
for (int i = 1; i <= limit * 2; i++) {
DummyPojo pojo = new DummyPojo("test" + i, 1024);
cache.put("test" + i, pojo);
if (i <= limit ) {
assertEquals(i, cache.heapEntriesCount());
} else {
assertEquals(limit, cache.heapEntriesCount());
}
logger.debug("goOverTheLimit " + cache);
}