utility wrapper to generate new id. In test env it reuses the old + postfix for test assertions.
supply null if no previous id exists
utility wrapper to generate new id. In test env it reuses the old + postfix for test assertions.