Let's say I have a Process Builder that populates a lookup field with a specific record using its Id. The Id is "hard-coded" into the action of the Process Builder (which means it's not a reference).
A few weeks later I write some random Apex Class and its respective Test Class. The Test Class is triggering the Process Builder but fails since (of course) the Id of this one record from the Process Builder cannot be found. It would work if I'd prefix the Test Class with
SeeAllData=true. But I don't want to use this backdoor.
Are there better solutions than using
SeeAllData=true to make the Test Class work in this case?