On the methadone program I'm on, before they could start the treatment, I had to take multiple toxicology screens to show I was addicted to heroin. These places are incredibly worried about opiate-naive individuals overdosing, which can happen even with the small initial doses on these programs. Note that this is in the UK, which has a much less litigious medical culture USA as well...
Not to cast aspersions on your friend, but have you considered that he may be lying to you about only using recreationally, and using this story to explain why he's on a treatment program? One thing about heroin is that it's pretty much impossible to use regularly without becoming addicted. As a heroin addict myself I know that unfortunately deception can easily become a normal part of your life.
A test to show you are addicted to opiates does not exist, and also your own experiences do not represent the experiences of every person that ever used drugs.
I'm happy to hear that your treatment is going well -- opioids can be incredibly hard to kick. On the other hand, you might be interested in some of the newer science of what drives addiction:
https://theoutline.com/post/2205/this-38-year-old-study-is-s...
The time-worn story of how every single addict starts out.
With opiates, the bigger danger is daily or consistent use over a period of time. The period depending on how often you take it and how you are using it and the strength of your dose.
Yet, if someone has an incident with alcohol (for example), they might be required to attend AA meetings even if they aren't a regular drinker. Same with other drugs.
This is true even if heroin withdrawal symptoms start after just a few days. Recreational use generally isn't daily use or two days in a row.