// Path: src/main/java/com/zuoxiaolong/deerlet/redis/client/command/Cursor.java
// public interface Cursor {
// 
// 	List<Integer> getCursorList();
// 	
// 	List<String> getResultList();
// 	
// 	
// }
// 
// Path: src/main/java/com/zuoxiaolong/deerlet/redis/client/command/ObjectSubcommands.java
// public enum ObjectSubcommands {
// 
// 	refcount,idletime,encoding
// 	
// }
// 
// Path: src/main/java/com/zuoxiaolong/deerlet/redis/client/command/Types.java
// public enum Types {
// 
// 	none,string,list,set,zset,hash
// 	
// }


import com.zuoxiaolong.deerlet.redis.client.command.Cursor;
import com.zuoxiaolong.deerlet.redis.client.command.ObjectSubcommands;
import com.zuoxiaolong.deerlet.redis.client.command.Types;
import junit.framework.Assert;
import org.junit.Test;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.List;
		for (int i = 1; i < list.size() + 1; i++) {
			Assert.assertEquals(i, Integer.valueOf(list.get(i - 1)).intValue());
		}
	}
	
	@Test
	public void testTtl() throws InterruptedException {
		Assert.assertTrue(deerletRedisClient.set("testKey", "TestValue"));
		Assert.assertEquals(-1, deerletRedisClient.ttl("testKey"));
		Assert.assertEquals(-2, deerletRedisClient.ttl("none"));
		Assert.assertTrue(deerletRedisClient.expire("testKey", 5));
		Assert.assertEquals(true, deerletRedisClient.ttl("testKey") > 2);
	}
	
	@Test
	public void testType() {
		Assert.assertTrue(deerletRedisClient.set("testKey", "TestValue"));
		Assert.assertEquals(Types.string, deerletRedisClient.type("testKey"));
		Assert.assertTrue(deerletRedisClient.set("testKey", 1));
		Assert.assertEquals(Types.string, deerletRedisClient.type("testKey"));
		Assert.assertTrue(deerletRedisClient.lpush("listKey", 1,1,1) > 0);
		Assert.assertEquals(Types.list, deerletRedisClient.type("listKey"));
	}
	
	@Test
	public void testScan() {
		for (int i = 0; i < 1000; i++) {
			Assert.assertTrue(deerletRedisClient.set("testKey" + i, "TestValue"));
		}
		Assert.assertEquals(1000, deerletRedisClient.dbsize());
// Path: src/main/java/com/zuoxiaolong/deerlet/redis/client/command/Cursor.java
// public interface Cursor {
// 
// 	List<Integer> getCursorList();
// 	
// 	List<String> getResultList();
// 	
// 	
// }
// 
// Path: src/main/java/com/zuoxiaolong/deerlet/redis/client/command/ObjectSubcommands.java
// public enum ObjectSubcommands {
// 
// 	refcount,idletime,encoding
// 	
// }
// 
// Path: src/main/java/com/zuoxiaolong/deerlet/redis/client/command/Types.java
// public enum Types {
// 
// 	none,string,list,set,zset,hash
// 	
// }


// Path: src/test/java/com/zuoxiaolong/deerlet/redis/client/DeerletRedisClientKeyTest.java
import com.zuoxiaolong.deerlet.redis.client.command.Cursor;
import com.zuoxiaolong.deerlet.redis.client.command.ObjectSubcommands;
import com.zuoxiaolong.deerlet.redis.client.command.Types;
import junit.framework.Assert;
import org.junit.Test;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.List;

		for (int i = 1; i < list.size() + 1; i++) {
			Assert.assertEquals(i, Integer.valueOf(list.get(i - 1)).intValue());
		}
	}
	
	@Test
	public void testTtl() throws InterruptedException {
		Assert.assertTrue(deerletRedisClient.set("testKey", "TestValue"));
		Assert.assertEquals(-1, deerletRedisClient.ttl("testKey"));
		Assert.assertEquals(-2, deerletRedisClient.ttl("none"));
		Assert.assertTrue(deerletRedisClient.expire("testKey", 5));
		Assert.assertEquals(true, deerletRedisClient.ttl("testKey") > 2);
	}
	
	@Test
	public void testType() {
		Assert.assertTrue(deerletRedisClient.set("testKey", "TestValue"));
		Assert.assertEquals(Types.string, deerletRedisClient.type("testKey"));
		Assert.assertTrue(deerletRedisClient.set("testKey", 1));
		Assert.assertEquals(Types.string, deerletRedisClient.type("testKey"));
		Assert.assertTrue(deerletRedisClient.lpush("listKey", 1,1,1) > 0);
		Assert.assertEquals(Types.list, deerletRedisClient.type("listKey"));
	}
	
	@Test
	public void testScan() {
		for (int i = 0; i < 1000; i++) {
			Assert.assertTrue(deerletRedisClient.set("testKey" + i, "TestValue"));
		}
		Assert.assertEquals(1000, deerletRedisClient.dbsize());
		Cursor cursor = deerletRedisClient.scan(null, null, 100);