If you weren't driving you don't have to take any tests or say anything. You should have kept it on you anyway because it looks like he was going to search the car after someone yelled F the Poilce; but it would have been harder for him to justify looking in your underwear. He might have wanted to do a pat down for weapons but he probably wouldn't have been able to pull you out of the car you were not driving and search your nuts. You got off easy unless they hit the owner of the car with drug possesion. Then you are a bad friend.