public function testRefreshUserNotFound()
{
$userId = 123;
$apiUser = new User(array('content' => new Content(array('versionInfo' => new VersionInfo(array('contentInfo' => new ContentInfo(array('id' => $userId))))))));
$user = $this->getMock('eZ\\Publish\\Core\\MVC\\Symfony\\Security\\UserInterface');
$user->expects($this->once())->method('getAPIUser')->will($this->returnValue($apiUser));
$this->userService->expects($this->once())->method('loadUser')->with($userId)->will($this->throwException(new NotFoundException('user', 'foo')));
$this->userProvider->refreshUser($user);
}