### Question:
Kelly { private void reloadCacheEntry(CacheEntry cacheEntry) throws ExecutionException, InterruptedException { LoaderCallable<T> loaderCallable = new LoaderCallable<T>(this, cacheProvider, cacheLoader, cacheEntry); executorService.submit(loaderCallable); } @Deprecated  Kelly(CacheProvider<T> cacheProvider, CacheLoader<T> cacheLoader, int executorPoolSize);  Kelly(CacheProvider<T> cacheProvider, CacheLoader<T> cacheLoader, int threadPoolSize,
                 int queueSize); T get(String key); boolean put(String key, CacheEntry<T> value); void expire(String key);  }### Answer:
@Test public void reloadCacheEntryTest() throws CacheProviderException, KellyException, InterruptedException, CacheLoaderException { CacheProvider<String> cacheProvider = Mockito.mock(CacheProvider.class); CacheLoader<String> cacheLoader = Mockito.mock(CacheLoader.class); CacheEntry<String> cacheEntry = new CacheEntry<String>("dude", "suman karthik", 1); CacheEntry<String> cacheEntry1 = new CacheEntry<String>("dude", "suman", 1); Kelly<String> kelly = new Kelly<String>(cacheProvider, cacheLoader, 1); Mockito.when(cacheProvider.get("dude")).thenReturn(cacheEntry); Mockito.when(cacheLoader.reload("dude", "suman karthik")).thenReturn(cacheEntry1); assert kelly.get("dude").equals("suman karthik"); Thread.sleep(3000); assert kelly.get("dude").equals("suman karthik"); Thread.sleep(1000); Mockito.verify(cacheLoader).reload("dude","suman karthik"); Mockito.verify(cacheProvider).put("dude", cacheEntry1); }