public function testReverseLookupAlwaysAvailablePath($spiUrlAliases, $prioritizedLanguageCodes, $paths)
{
$urlAliasService = $this->getRepository()->getURLAliasService();
$configuration = array('prioritizedLanguageList' => $prioritizedLanguageCodes, 'showAllTranslations' => false);
$this->setConfiguration($urlAliasService, $configuration);
$urlAliasHandler = $this->getPersistenceMockHandler('Content\\UrlAlias\\Handler');
$urlAliasHandler->expects($this->once())->method('listURLAliasesForLocation')->with($this->equalTo(42), $this->equalTo(false))->will($this->returnValue($spiUrlAliases));
$location = $this->getLocationStub();
$urlAlias = $urlAliasService->reverseLookup($location);
self::assertEquals(reset($paths), $urlAlias->path);
}