The cop did wrong by not showing his badge, and by arresting him. If anything he should have wrote him a ticket.