public function testRemove()
{
$mockedService = $this->getPartlyMockedURLWildcardService();
/** @var \PHPUnit_Framework_MockObject_MockObject $handlerMock */
$handlerMock = $this->getPersistenceMock()->urlWildcardHandler();
$repositoryMock = $this->getRepositoryMock();
$repositoryMock->expects($this->once())->method('hasAccess')->with($this->equalTo('content'), $this->equalTo('urltranslator'))->will($this->returnValue(true));
$repositoryMock->expects($this->once())->method('beginTransaction');
$repositoryMock->expects($this->once())->method('commit');
$handlerMock->expects($this->once())->method('remove')->with($this->equalTo('McBomb'));
$mockedService->remove(new URLWildcard(array('id' => 'McBomb')));
}