CacheControllerHolder { @Nullable public CacheController get(final CacheType cacheType) { return controllers.get(checkNotNull(cacheType)); } CacheControllerHolder(final CacheController contentCacheController,
                               final CacheController metadataCacheController); @Nonnull CacheController getContentCacheController(); @Nonnull CacheController getMetadataCacheController(); @Nullable CacheController get(final CacheType cacheType); CacheController require(final CacheType cacheType); @Nullable CacheController set(final CacheType cacheType, @Nullable final CacheController cacheController); void invalidateCaches(); static final CacheType CONTENT; static final CacheType METADATA; }
@Test public void testGetContentCacheControllerViaGet() { assertThat(underTest.get(CacheControllerHolder.CONTENT), is(contentCacheController)); }
@Test public void testGetMetadataCacheControllerViaGet() { assertThat(underTest.get(CacheControllerHolder.METADATA), is(metadataCacheController)); }
@Test public void testGetUnknownCacheControllerViaGet() { assertThat(underTest.get(TEST), is(nullValue())); }