public function add(EntityInterface $group)
    {
        if (!is_a($group, self::ACCESS_ENTITY_TYPE)) {
            throw new Exception('The given entity (' . get_class($group) . ') is not compatible with this data source (' . self::class . '.');
        }
        
        // If the name of the group already is used we cannot add a new group
        if ($this->accessControlManager->hasAccessEntityForName(self::ACCESS_ENTITY_TYPE, $group->getName())) {
            throw new Exception('Cannot add the group. The name of the group is already in use.');
        }
        
        // Add the access entity
        $uuid = $this->accessControlManager->addAccessEntity($group);
        
        if ($uuid === false) {
            throw new Exception('Cannot add the group. Internal software error.');
        }
        
        return $group;
    }