public function testIsEqualTo()
{
$userId = 123;
$apiUser = $this->getMock('eZ\\Publish\\API\\Repository\\Values\\User\\User');
$apiUser->expects($this->any())->method('__get')->with('id')->will($this->returnValue($userId));
$roles = array('ROLE_USER');
$user = new User($apiUser, $roles);
$apiUser2 = $this->getMock('eZ\\Publish\\API\\Repository\\Values\\User\\User');
$apiUser2->expects($this->any())->method('__get')->with('id')->will($this->returnValue($userId));
$user2 = new User($apiUser2, array());
$this->assertTrue($user->isEqualTo($user2));
}