### Question:
AbstractCacheManager implements CacheManager { @Override public void close() { closed.set( true ); for ( String cacheName : managedCacheMap.keySet() ) { destroyCache( cacheName ); } } AbstractCacheManager(); @Override CachingProvider getCachingProvider(); @Override Cache<K, V> createCache( String cacheName, C configuration ); @Override URI getURI(); @Override ClassLoader getClassLoader(); @Override Properties getProperties(); @Override Cache<K, V> getCache( String cacheName ); @Override Cache<K, V> getCache( String cacheName, Class<K> keyType, Class<V> valueType ); @Override Iterable<String> getCacheNames(); @Override void destroyCache( String cacheName ); @Override void enableManagement( String cacheName, boolean enabled ); @Override void enableStatistics( String cacheName, boolean enabled ); @Override void close(); @Override boolean isClosed(); @Override T unwrap( Class<T> clazz );  }### Answer:
@Test public void testClose() throws Exception { int numCaches = 10; List<Cache> caches = Lists.newArrayListWithExpectedSize( numCaches ); for ( int i = 0; i < numCaches; i++ ) { caches.add( cacheManager.createCache( "cache_" + i, new MutableConfiguration() ) ); } assertThat( cacheManager.isClosed(), is( false ) ); cacheManager.close(); assertThat( cacheManager.isClosed(), is( true ) ); for ( Cache cache : caches ) { verify( cache, only() ).close(); } assertThat( cacheManager.getCacheNames(), emptyIterable() ); }