CacheLoaderConfig cacheLoaderConfig = UnitTestConfigurationFactory.buildSingleCacheLoaderConfig(false, "", DummyInMemoryCacheLoader.class.getName(), "", false, true, false, false, false);
// assign the cache loader explicitly so it will stick between restarts
cacheLoaderConfig.getFirstCacheLoaderConfig().setCacheLoader(new DummyInMemoryCacheLoader());
Configuration cfg = new Configuration();
cfg.setCacheLoaderConfig(cacheLoaderConfig);
cache = new UnitTestCacheFactory().createCache(cfg, getClass());
cache.put(fqn, key, "value");
// flush the cache and start with totally clean state
cache.stop();
cache.start();