/**
  *  Return UserEmailOrigin entity created with data of $data variable
  */
 protected function getUserEmailOrigin($data)
 {
     $userEmailOrigin = new UserEmailOrigin();
     $userEmailOrigin->setUser($data['user']);
     $userEmailOrigin->setAccessTokenExpiresAt($data['accessTokenExpiresAt']);
     if (isset($data['password'])) {
         $userEmailOrigin->setPassword($data['password']);
     }
     if (isset($data['accessToken'])) {
         $userEmailOrigin->setAccessToken($data['accessToken']);
     }
     if (isset($data['refreshToken'])) {
         $userEmailOrigin->setRefreshToken($data['refreshToken']);
     }
     $organization = $this->getMock('Oro\\Bundle\\OrganizationBundle\\Entity\\Organization');
     $userEmailOrigin->setOrganization($organization);
     return $userEmailOrigin;
 }