How to mock HashOperations of Spring StringRedisTemplate?
I'm writing unit test for my CacheService class: public class CacheService { private final HashOperations<String, String, String> redisHashOps; private final ValueOperations<String, String> valueOps; private final SetOperations<String, String> setOps; public CacheService(StringRedisTemplate redisTemplate) { this.redisHashOps = redisTemplate.opsForHash(); this.valueOps = redisTemplate.opsForValue(); this.setOps =…