Keep this in mind. law enforcement at any level does not need much "cause" to cuff and stuff you on site. If you don't like it you get to contest it later in court, but at that moment you will be read rights, hauled off, put in the tank, your vehicle gets impounded, then someone posts bail and you go free. Then its your word against the officers. As for cooperating with the officer on vehicular searches, in most instances the law is written that if you decline its an admission of guilt, act of suspicion, or probible cause. They don't need warrants because vehicles are mobile and getting a judge involved takes too many resources. The above situation sounds silly, and I'm not defending the officers behavior, but if you resist and act like a jackass you most likely will bring it on yourself