### Question:
SpringRemoteCacheManager implements org.springframework.cache.CacheManager { @Override public SpringCache getCache(final String name) { final RemoteCache<Object, Object> nativeCache = this.nativeCacheManager.getCache(name); if (nativeCache == null) { springCaches.remove(name); return null; } return springCaches.computeIfAbsent(name, n -> new SpringCache(nativeCache, readTimeout, writeTimeout)); } SpringRemoteCacheManager(final RemoteCacheManager nativeCacheManager, long readTimeout, long writeTimeout);  SpringRemoteCacheManager(final RemoteCacheManager nativeCacheManager); @Override SpringCache getCache(final String name); @Override Collection<String> getCacheNames(); RemoteCacheManager getNativeCacheManager(); long getReadTimeout(); long getWriteTimeout(); void setReadTimeout(final long readTimeout); void setWriteTimeout(final long writeTimeout); void start(); void stop();  }### Answer:
@Test public final void springRemoteCacheManagerShouldProperlyCreateCache() { final Cache defaultCache = objectUnderTest.getCache(TEST_CACHE_NAME); assertNotNull("getCache(" + TEST_CACHE_NAME + ") should have returned a default cache. However, it returned null.", defaultCache); assertEquals("getCache(" + TEST_CACHE_NAME + ") should have returned a cache name \"" + TEST_CACHE_NAME + "\". However, the returned cache has a different name.", TEST_CACHE_NAME, defaultCache.getName()); }
@Test public final void getCacheShouldReturnSameInstanceForSameName() { final SpringCache firstObtainedSpringCache = objectUnderTest.getCache(TEST_CACHE_NAME); final SpringCache secondObtainedSpringCache = objectUnderTest.getCache(TEST_CACHE_NAME); assertSame( "getCache() should have returned the same SpringCache instance for the same name", firstObtainedSpringCache, secondObtainedSpringCache); }
@Test public final void getCacheShouldReturnDifferentInstancesForDifferentNames() { final SpringCache firstObtainedSpringCache = objectUnderTest.getCache(TEST_CACHE_NAME); final SpringCache secondObtainedSpringCache = objectUnderTest.getCache(OTHER_TEST_CACHE_NAME); assertNotSame( "getCache() should have returned different SpringCache instances for different names", firstObtainedSpringCache, secondObtainedSpringCache); }
@Test public final void getCacheShouldReturnNullItWasChangedByRemoteCacheManager() { objectUnderTest.getCache(TEST_CACHE_NAME); remoteCacheManager.administration().removeCache(TEST_CACHE_NAME); assertNull(objectUnderTest.getCache(TEST_CACHE_NAME)); }