/**
  * AggregateRepositoryFactory constructor.
  * @param MapInterface $config
  */
 public function __construct($config = null)
 {
     if (!$config instanceof MapInterface) {
         $config = new Map($config);
     }
     $this->config = new Map(['event_bus' => ['service' => new SimpleEventBus()], 'event_store' => ['adapter' => InMemoryAdapter::class], 'snapshotter' => ['enabled' => false, 'store' => ['adapter' => InMemorySnapshotAdapter::class], 'strategy' => ['name' => CountSnapshotStrategy::class, 'arguments' => []]]]);
     if ($config) {
         $this->config->concat($config);
     }
 }
 /**
  * @test
  */
 public function is_should_concatenate_vectors()
 {
     if ($this->coll instanceof MapInterface) {
         $this->coll->add(new Pair(0, 1))->add(new Pair(1, 2))->add(new Pair(3, 4));
     } else {
         $this->coll->add(1)->add(2)->add(4);
     }
     $coll2 = new Vector([3]);
     $concatenated = $this->coll->concat($coll2);
     $this->assertEquals([1, 2, 4, 3], $concatenated->toArray());
 }