public function getRandomActiveUser()
 {
     $payload = new UsersGetPresencePayload();
     $attemptsCount = 0;
     while (true) {
         if (++$attemptsCount == self::RANDOM_ATTEMPTS_LIMIT) {
             break;
         }
         $user = $this->getRandomUser();
         $payload->setUserId($user->getId());
         $response = $this->apiClient->send($payload);
         $presence = $response->getPresence();
         if ($presence == User::PRESENCE_ACTIVE) {
             return $user;
         }
     }
 }
 /**
  * {@inheritdoc}
  */
 protected function createPayload()
 {
     $payload = new UsersGetPresencePayload();
     $payload->setUserId('U1234567');
     return $payload;
 }