Problem/Motivation
In #3036593: Add 'drupal_internal__target_id' to JSON:API representation of entity reference fields, because that can't be retrieved from the target resource for target entity types without corresponding resources it was noticed there are quite a lot of hardcoded references to id's and such for entities. Preferably this would use the real references so changes in how database id's are generate (like autoincrements) don't break the tests.
Proposed resolution
Change references to things like "uid", "target_id", "uuid" to real references.