protected function delete($step)
    {
        $groupsCollection = $this->matchObjectStateGroups('delete', $step);

        $this->setReferences($groupsCollection, $step);

        $objectStateService = $this->repository->getObjectStateService();

        foreach ($groupsCollection as $objectStateGroup) {
            $objectStateService->deleteObjectStateGroup($objectStateGroup);
        }

        return $groupsCollection;
    }