private void checkAndDisableStore(EmbeddedCacheManager cm, int count) {
Cache<Object, Object> cache = cm.getCache();
PersistenceManager clm = TestingUtil.extractComponent(cache, PersistenceManager.class);
assertEquals(count, clm.getStores(DummyInMemoryStore.class).size());
clm.disableStore(DummyInMemoryStore.class.getName());
List<CommandInterceptor> interceptors = TestingUtil.extractComponent(cache, InterceptorChain.class)
.getInterceptorsWhichExtend(CacheLoaderInterceptor.class);
assertTrue("Expected empty CacheLoaderInterceptor list: " + interceptors, interceptors.isEmpty());
interceptors = TestingUtil.extractComponent(cache, InterceptorChain.class)
.getInterceptorsWhichExtend(CacheWriterInterceptor.class);