### Question:
AbstractCacheManager implements CacheManager { @Override public void destroyCache( String cacheName ) { Cache<?, ?> cache = managedCacheMap.remove( cacheName ); if ( cache != null ) { cache.close(); } } 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 testDestroyCache() throws Exception { cacheManager.destroyCache( CACHE_NAME ); Cache<Object, Object> cache = cacheManager.createCache( CACHE_NAME, new MutableConfiguration<Object, Object>() ); assertThat( cacheManager.getCacheNames(), contains( CACHE_NAME ) ); cacheManager.destroyCache( CACHE_NAME ); assertThat( cacheManager.getCacheNames(), emptyIterable() ); verify( cache, only() ).close(); }