Device ID after restoring from a backup

For the new SDK 40 it is mentioned that now push tokens are renewed after a backup is restored. I did not find any mentioning of the device id and the documentation did not mention it so I want to make sure. Is the device id still the same after a restoring from a backup? If so is there any way to prevent this, so that the user needs to start with a new device id after a backup or is this fully up to google / apple?

Is there any easy way to test this whole backup restoring workflow? Its quite hard to get the whole notifications across backups right without a good testing method.