private function addRole(Group $group, $roleData)
    {
        if (isset($roleData['id'])) {
            $role = $this->get('sulu.repository.role')->findRoleById($roleData['id']);

            if (!$role) {
                throw new EntityNotFoundException($this->get('sulu.repository.role')->getClassName(), $roleData['id']);
            }

            if (!$group->getRoles()->contains($role)) {
                $group->addRole($role);
            }
        }

        return true;
    }