/**
* @group functional
*/
public function testRegisterRepository()
{
$repositoryName = 'testrepo';
$location = $this->_snapshotPath . 'backup1';
$response = $this->_snapshot->registerRepository($repositoryName, 'fs', array('location' => $location));
$this->assertTrue($response->isOk());
$response = $this->_snapshot->getRepository($repositoryName);
$this->assertEquals($location, $response['settings']['location']);
// attempt to retrieve a repository which does not exist
$this->setExpectedException('Elastica\\Exception\\NotFoundException');
$this->_snapshot->getRepository('foobar');
}