/**
  * {@inheritdoc}
  */
 public function delete(\Magento\Eav\Api\Data\AttributeGroupInterface $group)
 {
     /** @var \Magento\Catalog\Model\Product\Attribute\Group $group */
     if ($group->hasSystemAttributes()) {
         throw new StateException(__('Attribute group that contains system attributes can not be deleted'));
     }
     return $this->groupRepository->delete($group);
 }