protected function getUniqueUserName($name)
    {
        $i = 0;
        $testName = $name;

        do {
            $user = $this->userManager->findUserByUsername($testName);
        } while (null !== $user && $i < $this->iterations && $testName = $name.++$i);

        return null !== $user ? '' : $testName;
    }