### Question:
GuavaCacheManager extends AbstractCacheManager { @Override public <K, V, C extends Configuration<K, V>> Cache<K, V> newCache( final String cacheName, final C configuration ) { CacheBuilder<Object, Object> cacheBuilder = CacheBuilder.newBuilder(); if ( configuration instanceof CompleteConfiguration ) { configureCacheBuilder( (CompleteConfiguration) configuration, cacheBuilder ); } return new WrappedCache<K, V>( cacheBuilder.<K, V>build() ) { @Override public String getName() { return cacheName; } @Override public CacheManager getCacheManager() { return GuavaCacheManager.this; } @Override public void close() { if ( !isClosed() ) { super.close(); destroyCache( cacheName ); } } @Override public <T extends Configuration<K, V>> T getConfiguration( Class<T> clazz ) { return Constants.unwrap( configuration, clazz ); } }; }  @Override Cache<K, V> newCache( final String cacheName, final C configuration );  }### Answer:
@Test public void testNewCache() throws Exception { MutableConfiguration<String, Map> configuration = new MutableConfiguration<String, Map>(); configuration.setTypes( String.class, Map.class ); Cache<String, Map> cache = cacheManager.createCache( CACHE_NAME, configuration ); assertThat( cache.getConfiguration( Configuration.class ), sameInstance( (Configuration) configuration ) ); assertThat( cache.getName(), is( CACHE_NAME ) ); assertThat( cacheManager.getCacheNames(), contains( CACHE_NAME ) ); cache.close(); assertThat( cache.isClosed(), is( true ) ); assertThat( cacheManager.getCacheNames(), emptyIterable() ); }