PolicyCacheImpl implements PolicyCache { @Override public Optional<Cache<String, Policy>> getPolicyCache() { return cacheManager.getCache(CACHE_NAME, String.class, Policy.class); }  @Override Optional<Cache<String, Policy>> getPolicyCache();  }
@Test public void getPolicyCacheTest() { Optional<Cache<String, Policy>> result = service.getPolicyCache(); assertTrue(result.isPresent()); assertEquals(cache, result.get()); }