public function testFactory()
 {
     $configObject = (new RedisConfigFactory())->create($this->options);
     $factory = new RedisClientFactory();
     $redisClient = $factory->create($configObject);
     static::assertInstanceOf(Client::class, $redisClient);
     $redisClient2 = $factory->create($configObject);
     static::assertSame($redisClient, $redisClient2);
 }
 /**
  * @param array  $redisOptions
  * @param string $prefix
  *
  * @return RedisStorage
  *
  * @throws \InvalidArgumentException
  */
 public function create(array $redisOptions, $prefix)
 {
     $redisConfig = (new RedisConfigFactory())->create($redisOptions);
     $notifConfig = (new RedisNotifConfigFactory())->create($redisConfig, $prefix);
     $redisClient = RedisClientFactory::create($notifConfig);
     return new RedisStorage($redisClient, $prefix);
 }