public function testAliases()
 {
     $this->createSampleData();
     $aliasPostfix = '-alias';
     $addAliases = array('actions' => array(array('add' => array('index' => ES_INDEX, 'alias' => ES_INDEX . $aliasPostfix))));
     $removeAliases = array('actions' => array(array('remove' => array('index' => ES_INDEX, 'alias' => ES_INDEX . $aliasPostfix))));
     $this->indexRepository->updateAliases($addAliases);
     $result = $this->catRepository->aliases();
     $data = $result->getData()->getGatewayValue();
     $this->assertCount(1, $data);
     $this->assertSame(ES_INDEX, $data[0]['index']);
     $this->assertSame(ES_INDEX . $aliasPostfix, $data[0]['alias']);
     $this->indexRepository->updateAliases($removeAliases);
 }
 public function testAliasesException()
 {
     $this->indexRepository = new CatRepository($this->client, $this->serializer, $this->repositoryClassMap, ClientVersionMapInterface::VERSION_V090X, $this->requestRepositoryFactory);
     $this->requestRepositoryFactory->expects($this->never())->method('create');
     $this->repositoryClassMap->expects($this->never())->method('getClassName');
     $this->client->expects($this->never())->method('send');
     $this->setExpectedException('Elastification\\Client\\Exception\\RepositoryException', 'Version folder V090x is not allowed for cat repository');
     $this->indexRepository->aliases();
 }