public void testSomething() {
def redis = new Jedis('localhost')
assert redis
println redis.info()
redis.flushDB()
println redis.info()
def now = new Date()
println now
(0..9999).each { i ->
redis.hmset("jp.co.metabolics:redistest:Person:$i" as String,
[surname:"YAMADA$i" as String, forename:"Masaki$i" as String, dateOfBirth:now as String, gender:true as String])
redis.sadd("jp.co.metabolics:redistest:Person:id:$i" as String, "$i" as String)
redis.sadd("jp.co.metabolics:redistest:Person:surname:YAMADA$i" as String, "$i" as String)
redis.sadd("jp.co.metabolics:redistest:Person:forename:Masaki$i" as String, "$i" as String)
}
println new Date()
assert redis.exists('jp.co.metabolics:redistest:Person:8267')
assert redis.type('jp.co.metabolics:redistest:Person:8267') == 'hash'
assert redis.hget('jp.co.metabolics:redistest:Person:8267', 'surname') == 'YAMADA8267'
def i = redis.sinter('jp.co.metabolics:redistest:Person:surname:YAMADA8267')
assert i.contains('8267')
println new Date()
redis.save()
println new Date()
}