public function testCreateGlobalUrlAliasWithRollback()
{
$resource = 'module:content/search';
$repositoryMock = $this->getRepositoryMock();
$mockedService = $this->getPartlyMockedURLAliasServiceService();
/** @var \PHPUnit_Framework_MockObject_MockObject $urlAliasHandlerMock */
$urlAliasHandlerMock = $this->getPersistenceMock()->urlAliasHandler();
$repositoryMock->expects($this->once())->method('beginTransaction');
$repositoryMock->expects($this->once())->method('rollback');
$urlAliasHandlerMock->expects($this->once())->method('createGlobalUrlAlias')->with($this->equalTo($resource), $this->equalTo('path'), $this->equalTo('forwarding'), $this->equalTo('languageCode'), $this->equalTo('alwaysAvailable'))->will($this->throwException(new Exception('Handler threw an exception')));
$mockedService->createGlobalUrlAlias($resource, 'path', 'languageCode', 'forwarding', 'alwaysAvailable');
}