CacheStrategyImpl implements CacheStrategy { @Override public long maxSize() { return maxSize; } CacheStrategyImpl(ConfigurationParameters options, boolean isRefresh); @Override long maxSize(); @Override boolean loadFully(long numEntriesSize, long cnt); @Override boolean usePathEntryMap(long cnt);  }
@Test public void testMaxSize() { long maxSize = 30L; assertEquals(maxSize, new CacheStrategyImpl(ConfigurationParameters.of(EAGER_CACHE_SIZE_PARAM, maxSize), false).maxSize()); assertEquals(maxSize, new CacheStrategyImpl(ConfigurationParameters.of(EAGER_CACHE_SIZE_PARAM, maxSize), true).maxSize()); }
@Test public void testDefaultMaxSize() { long defaultMaxSize = 250L; assertEquals(defaultMaxSize, new CacheStrategyImpl(ConfigurationParameters.EMPTY, false).maxSize()); assertEquals(defaultMaxSize, new CacheStrategyImpl(ConfigurationParameters.EMPTY, true).maxSize()); }