public RedisConnectionFactory(final RedisConfigProperties redisConfigProperties) {
        lettuceConnectionFactory = createLettuceConnectionFactory(redisConfigProperties);
        lettuceConnectionFactory.afterPropertiesSet();
    }
@Test
    public void redisConnectionFactoryTest() {
        final RedisConfigProperties redisConfigProperties = mock(RedisConfigProperties.class);
        when(redisConfigProperties.getMode()).thenReturn(RedisModeEnum.SENTINEL.getName());
        when(redisConfigProperties.getMaster()).thenReturn("master");
        when(redisConfigProperties.getUrl()).thenReturn("localhost:6379");
        Assertions.assertDoesNotThrow(() -> new RedisConnectionFactory(redisConfigProperties));
        when(redisConfigProperties.getPassword()).thenReturn("password");
        Assertions.assertDoesNotThrow(() -> new RedisConnectionFactory(redisConfigProperties));
        when(redisConfigProperties.getMode()).thenReturn(RedisModeEnum.CLUSTER.getName());
        Assertions.assertDoesNotThrow(() -> new RedisConnectionFactory(redisConfigProperties));
        when(redisConfigProperties.getPassword()).thenReturn(null);
        Assertions.assertDoesNotThrow(() -> new RedisConnectionFactory(redisConfigProperties));
        when(redisConfigProperties.getMode()).thenReturn(RedisModeEnum.STANDALONE.getName());
        when(redisConfigProperties.getPassword()).thenReturn("password");
        when(redisConfigProperties.getMaxWait()).thenReturn(Duration.ofMillis(-1));
        Assertions.assertDoesNotThrow(() -> new RedisConnectionFactory(redisConfigProperties));
    }