assumeTrue(key1 instanceof String && value1 instanceof String);
// Jedis does not support pTtl
JedisConnectionFactory factory = new JedisConnectionFactory();
factory.setHostName(SettingsUtils.getHost());
factory.setPort(SettingsUtils.getPort());
factory.afterPropertiesSet();
final StringRedisTemplate template2 = new StringRedisTemplate(factory);
template2.boundValueOps((String) key1).set((String) value1);
template2.expire((String) key1, 5, TimeUnit.SECONDS);
long expire = template2.getExpire((String) key1, TimeUnit.MILLISECONDS);
// we should still get expire in milliseconds if requested