ServiceCacheService implements CacheService { public Cache getCache( String dataServiceName ) { return cacheManager.getCache( getCacheName( dataServiceName ), CachedService.CacheKey.class, CachedService.class ); } ServiceCacheService( PentahoCacheManager cacheManager ); Cache getCache( String dataServiceName ); void destroyCache( String dataServiceName ); String getCacheName( String dataServiceName );  }
@Test public void testGetCache() { when( cacheManager.getCache( serviceCacheService.getCacheName( DATA_SERVICE_NAME ), CachedService.CacheKey.class, CachedService.class ) ).thenReturn( cache ); Cache cache = serviceCacheService.getCache( DATA_SERVICE_NAME ); assertNotNull( cache ); }