this.mockCtx.checking(new Expectations(){{
oneOf(jedis).type(key); will(returnValue(KeyType.LIST.toString()));
oneOf(jedis).llen(key); will(returnValue(size));
oneOf(jedis).lrange(key, offset, offset + count); will(returnValue(value));
}});
final KeyInfo keyInfo = work.doWork(this.jedis);
Assert.assertNotNull(keyInfo);
Assert.assertEquals("foo", keyInfo.getNamespace());
Assert.assertEquals("bar", keyInfo.getName());
Assert.assertEquals(KeyType.LIST, keyInfo.getType());
Assert.assertEquals((Long) size, keyInfo.getSize());
Assert.assertNotNull(keyInfo.getArrayValue());
Assert.assertEquals(count, keyInfo.getArrayValue().size());
Assert.assertTrue(value.containsAll(keyInfo.getArrayValue()));
}