Function regenerateId

utility wrapper to generate new id. In test env it reuses the old + postfix for test assertions.