@Bean
 public JedisConnectionFactory connectionFactory() {
   JedisConnectionFactory factory = new JedisConnectionFactory();
   factory.setHostName("192.168.230.53");
   factory.setDatabase(159);
   return factory;
 }
 protected final JedisConnectionFactory applyProperties(JedisConnectionFactory factory) {
   factory.setHostName(this.properties.getHost());
   factory.setPort(this.properties.getPort());
   if (this.properties.getPassword() != null) {
     factory.setPassword(this.properties.getPassword());
   }
   factory.setDatabase(this.properties.getDatabase());
   if (this.properties.getTimeout() > 0) {
     factory.setTimeout(this.properties.getTimeout());
   }
   return factory;
 }
  @Before
  public void setUp() throws Exception {

    executorMock = mock(Executor.class);

    connectionFactory = new JedisConnectionFactory();
    connectionFactory.setPort(SettingsUtils.getPort());
    connectionFactory.setHostName(SettingsUtils.getHost());
    connectionFactory.setDatabase(2);

    connectionFactory.afterPropertiesSet();

    container = new RedisMessageListenerContainer();
    container.setConnectionFactory(connectionFactory);
    container.setBeanName("container");
    container.setTaskExecutor(new SyncTaskExecutor());
    container.setSubscriptionExecutor(executorMock);
    container.afterPropertiesSet();
  }