MIAMI -

A Miami-Dade police officer shot during a gold chain robbery took the stand Monday at a hearing prior to the trial of the shooting suspect.

Willie Barney shot Officer Wislyn Joseph in the chest outside a church in Liberty City on Sept. 22, 2012, according to prosecutors. He is one of three men charged in the shooting.

During the motion to suppress hearing, Joseph said he was fixing a leak at the church when three men stripped him of his jewelry and shot him.

"I realized that I was bleeding. I lift up the shirt and I noticed blood was just pumping out," he said.

Police arrested Barney the next day during a traffic stop.

Barney's defense attorney argued the traffic stop wasn't legitimate and therefore neither was the evidence collected afterwards.

"They didn't have a year on the car," he said. "They stopped two Grand Prixs, I believe, they said before they stopped this car in question. They were stopping every car that was even close."

The judge ruled against the motion. The evidence includes a firearm and DNA linking Barney to the scene, according to court documents.