### Question:
DefaultNotificationCacheManager implements Initializable, Disposable { public Object getFromCache(String cacheKey, boolean count) { Object result = null; if (this.configuration.isRestCacheEnabled()) { if (count) { result = this.longCountCache.get(cacheKey); } else { result = this.longEventCache.get(cacheKey); } } return result; }  @Override void initialize(); String createCacheKey(NotificationParameters notificationParameters); Object getFromCache(String cacheKey, boolean count); void setInCache(String cacheKey, List<CompositeEvent> events, boolean count); void flushLongCache(); @Override void dispose();  }### Answer:
@Test public void getFromCache() { this.defaultNotificationCacheManager.getFromCache("anykey", true); verify(this.longCountCache).get("anykey"); verify(this.longEventCache, never()).get("anykey"); this.defaultNotificationCacheManager.getFromCache("anotherkey", false); verify(this.longEventCache).get("anotherkey"); verify(this.longCountCache, never()).get("anotherkey"); verify(this.configuration, times(3)).isRestCacheEnabled(); }