/**
  * Gets the "Administrators" role id, the special role created by data fixture in Authorization module.
  *
  * @return int The id of the Administrators role
  * @throws \Exception If Administrators role not found or problem connecting with database.
  */
 private function retrieveAdministratorsRoleId()
 {
     // Get Administrators role id to use as parent_id
     $administratorsRoleData = ['parent_id' => 0, 'tree_level' => 1, 'role_type' => Group::ROLE_TYPE, 'user_id' => 0, 'user_type' => UserContextInterface::USER_TYPE_ADMIN, 'role_name' => 'Administrators'];
     $result = $this->setup->getConnection()->fetchRow('SELECT * FROM ' . $this->setup->getTable('authorization_role') . ' ' . 'WHERE parent_id = :parent_id AND tree_level = :tree_level AND role_type = :role_type AND ' . 'user_id = :user_id AND user_type = :user_type AND role_name = :role_name', $administratorsRoleData);
     if (empty($result)) {
         throw new \Exception('No Administrators role was found, data fixture needs to be run');
     } else {
         // Found at least one, use first
         return $result['role_id'];
     }
 }