### Question:
RedisCacheService extends DefaultService implements CacheService { @Override public Properties getServiceProperties() { Properties serviceProps= new Properties(); for(CacheProperty property:CacheProperty.values()){ serviceProps.put(property.getName(), property.getDefaultValue()); } return serviceProps; } @Inject  RedisCacheService(SystemConfiguration config, CacheRedisClient cacheRedisClient); @SuppressWarnings("unchecked") @Override V get(String key); @SuppressWarnings("unchecked") @Override Map<String, V> get(Set<String> keySet); @Override void put(String key, V value, int ttl); @Override void put(Map<String, V> entries, int ttl); @Override void expire(String key, int ttl); @Override void expire(Set<String> keys, int ttl); @Override boolean exist(String key); @Override Map<String, Boolean> exist(Set<String> keys); @Override Set<String> getKeysByPattern(String pattern); @Override Map<String, V> getByPattern(String pattern); @Override void delete(String key); @Override void delete(Set<String> keySet); @Override void append(String key, V value); @SuppressWarnings("unchecked") @Override List<V> getRange(String key, int startOffset, int endOffset); @Override void append(String key, V value, int ttl); @SuppressWarnings("unchecked") @Override Map<String, V> getRange(Set<String> keys, int startOffset, int endOffset); @Override int getCacheExpirationTime(); @Override Properties getServiceProperties(); @Override void dispose();  }### Answer:
@Test public void testGetServiceProperties() { JedisCluster mockJedisClient = mock(JedisCluster.class); CacheRedisClient mockedCachedRedisClient = mock(CacheRedisClient.class); when(mockedCachedRedisClient.getJedisClusterClient()).thenReturn(mockJedisClient); RedisCacheService redisCacheService = new RedisCacheService(config, mockedCachedRedisClient); Properties props = redisCacheService.getServiceProperties(); Enumeration < ? > enumeration = props.propertyNames(); List<String> namesList = Lists.newArrayList(); while (enumeration.hasMoreElements()) { namesList.add((String) enumeration.nextElement()); } String name1 = "service.property.cache.redis.cache.expiry.in.sec"; assertTrue("propname [" + name1 + "] not found in " + namesList, namesList.contains(name1)); name1 = "service.property.cache.redis.cluster"; assertTrue("propname [" + name1 + "] not found in " + namesList, namesList.contains(name1)); name1 = "service.property.cache.redis.server.max.connections"; assertTrue("propname [" + name1 + "] not found in " + namesList, namesList.contains(name1)); }