Barney takes it upon himself to show that the Mayberry Security Bank is a pushover for a robbery ("The Bank Job," Episode #78). He poses as cleaning lady Mrs. MacGruder's cousin by wearing Mrs. Kelsey's clothing.
Though his undercover work is never as smooth as that of Glenn Ford in the movies, Barney still gets the job done. That's a safe bet in this case.