### Question:
DefaultSynchronizedCacheStrategyDecorator extends AbstractSynchronizedCacheStrategyDecorator<CacheKey, CacheValue> { boolean wasCheckedForChange(final CacheKey key) { return checkedKeys.contains(key); } DefaultSynchronizedCacheStrategyDecorator(final CacheStrategy<CacheKey, CacheValue> cacheStrategy); static CacheStrategy<CacheKey, CacheValue> decorate(final CacheStrategy<CacheKey, CacheValue> decorated); @Override void clear(); @Override void destroy();  }### Answer:
@Test public void shouldNotWatchForChangeUnlessCheckCompleted() { Context.get().getConfig().setResourceWatcherUpdatePeriod(100); final CacheKey key = new CacheKey(GROUP_NAME, ResourceType.JS, true); when(mockResourceWatcher.tryAsyncCheck(Mockito.eq(key))).thenReturn(false); victim.get(key); assertFalse(victim.wasCheckedForChange(key)); when(mockResourceWatcher.tryAsyncCheck(Mockito.eq(key))).thenReturn(true); victim.get(key); assertTrue(victim.wasCheckedForChange(key)); }