### Question:
RedisCacheProvider implements CacheProvider<String> { @Override public CacheEntry<String> get(String key) throws CacheProviderException { assert pool != null; try (Jedis jedis = pool.getResource()) { try { String valueFromCache = jedis.get(key); if (StringUtils.isNotBlank(valueFromCache)) { return mapper.readValue(valueFromCache, new TypeReference<CacheEntry<String>>() {}); } else { return null; } } catch (Exception e) { throw new CacheProviderException(e); } } } RedisCacheProvider(JedisSentinelPool pool, ObjectMapper mapper); @Override CacheEntry<String> get(String key); @Override Boolean put(String key, CacheEntry<String> cacheEntry);  }### Answer:
@Test public void shouldDeserialize() throws Exception { String key = "TEST-KEY"; when(jedis.get(key)).thenReturn(cacheEntryAsString); assertEquals(cacheEntryAsString, mapper.writeValueAsString(cacheProvider.get(key))); }