@Override
    public void close() {
        if (Objects.isNull(this.redisTemplate)) {
            return;
        }
        final ReactiveRedisConnectionFactory connectionFactory = this.redisTemplate.getConnectionFactory();
        try {
            ReactiveRedisConnection connection = connectionFactory.getReactiveConnection();
            connection.close();
            connection = connectionFactory.getReactiveClusterConnection();
            connection.close();
        } catch (Exception ignored) {
        }
    }
@Test
    public void closeCache() throws NoSuchFieldException, IllegalAccessException {
        final ICache cache = new RedisCache(getConfig());
        cache.close();
        final Field redisTemplate = RedisCache.class.getDeclaredField("redisTemplate");
        redisTemplate.setAccessible(true);
        redisTemplate.set(cache, null);
        cache.close();
        final ReactiveRedisTemplate reactiveRedisTemplate = mock(ReactiveRedisTemplate.class);
        final ReactiveRedisConnectionFactory redisConnectionFactory = mock(ReactiveRedisConnectionFactory.class);
        redisTemplate.set(cache, reactiveRedisTemplate);
        when(reactiveRedisTemplate.getConnectionFactory()).thenReturn(redisConnectionFactory);
        when(redisConnectionFactory.getReactiveClusterConnection()).thenReturn(mock(ReactiveRedisClusterConnection.class));
        when(redisConnectionFactory.getReactiveConnection()).thenReturn(mock(ReactiveRedisConnection.class));
        cache.close();
    }