public void testSelectDb() {
LettuceConnectionFactory factory2 = new LettuceConnectionFactory(SettingsUtils.getHost(), SettingsUtils.getPort());
factory2.setDatabase(1);
factory2.afterPropertiesSet();
StringRedisConnection connection2 = new DefaultStringRedisConnection(factory2.getConnection());
connection2.flushDb();
// put an item in database 0
connection.set("sometestkey", "sometestvalue");
try {
// there should still be nothing in database 1
assertEquals(Long.valueOf(0), connection2.dbSize());