My question involves criminal law for the state of: Tennessee (davidson county)

I'm going to go right into it. I was recently working with a buddy of mine on the road. We got stopped and the officer searched his car. The officer found a very small amount of pot (a bud the size of a nickle) in the floorboard of his car. The pot was around the middle of the floorboard between us. The officer cited me for the pot that was in his car. My friend is also prescribed to a schedule II substance for a back injury. They confiscated the pills and cited him with simple possession II. I am just wondering how I got cited for something that was not on my person and was in his car. About 3 years ago I got caught with marijuana and the charges were expunged in Rutherford county TN. I quit smoking ever since. I'm just wondering if this is lawful for them to charge me for the marijuana that they found in his car. And I will plead not guilty because i know for a fact it wasn't mine. I just need some input on the whole thing. It's stressing me out because i need a clean record to get a job. Thanks for reading my post, I hope to hear something soon.

-wrongfully accused