I won't link for obvious reasons. But, there is technology out there where one who belongs in jail may not go there because of a trick.
Oh, I am aware of a few tricks. None are guaranteed to keep someone out of jail if any of them are tried, though. If a person cannot pee clean on their own, they are probably kissing their probation goodbye.
I am also thinking that, if someone believes a question about using a friend's pee for a probation test belongs in the "legal ethics and lawyer malpractice" section of the forum, they probably won't be peeing clean on their own any time soon.