protected function getRoleServiceMock()
{
$roleServiceMock = $this->getMock('eZ\\Publish\\Core\\Repository\\RoleService', array(), array(), '', false);
$roleServiceMock->expects($this->any())->method('newRoleCreateStruct')->with($this->equalTo('Identifier Bar'))->will($this->returnValue(new RoleCreateStruct(array('identifier' => 'Identifier Bar'))));
return $roleServiceMock;
}