public function resetAutoIncrementLazily($tableName)
    {
        if (!$this->isTableNameAllowed($tableName)) {
            throw new \InvalidArgumentException(
                'The given table name is invalid. This means it is either empty or not in the list of allowed tables.',
                1334439548
            );
        }

        // Checks whether the current table qualifies for this method. If there
        // is no column "uid" that has the "auto_increment" flag set, we should
        // not try to reset this inexistent auto increment index to avoid
        // database errors.
        if (!Tx_Phpunit_Service_Database::tableHasColumnUid($tableName)) {
            return;
        }

        if ($this->getAutoIncrement($tableName) > ($this->getMaximumUidFromTable($tableName)
                + $this->resetAutoIncrementThreshold)) {
            $this->resetAutoIncrement($tableName);
        }
    }