for (int i = 1; i < KEYS.length; i++) {
assertInCacheAndStore(cache, store, KEYS[i], VALUES[i]);
}
DataContainer dataContainer = cache.getAdvancedCache().getDataContainer();
assertEquals("Wrong number of keys in data container after puts.", KEYS.length, dataContainer.size());
assertEquals("Some exceptions has been caught during the puts.", 0, interceptor.exceptionsCaught);
cache.stop();
assertEquals("Expected empty data container after stop.", 0, dataContainer.size());
assertEquals("Some exceptions has been caught during the stop.", 0, interceptor.exceptionsCaught);
cache.start();
assertTrue("Preload should be enabled after restart.", cache.getCacheConfiguration().loaders().preload());
assertTrue("Async Store should be enabled after restart.", cache.getCacheConfiguration().loaders().usingAsyncStore());
dataContainer = cache.getAdvancedCache().getDataContainer();
assertEquals("Wrong number of keys in data container after preload.", KEYS.length, dataContainer.size());
assertEquals("Some exceptions has been caught during the preload.", 0, interceptor.exceptionsCaught);
// Re-retrieve since the old reference might not be usable
store = TestingUtil.extractComponent(cache, CacheLoaderManager.class).getCacheStore();
for (int i = 1; i < KEYS.length; i++) {