San Francisco's No. 2 ranked pass defense will be tested against a new-look Arizona Cardinals offense this Sunday at Candlestick Park.

The 49ers coach explained that San Francisco’s defensive takeaways come in bunches, just like olives coming out of a jar.

“We’ve been kind of down on getting turnovers and sometimes things just kind of start breaking right for you,” Harbaugh said at his Monday press conference. “Kind of like the olive jar. Everybody’s familiar with the olive jar.”

Not really, coach.

“Well, you open it up and a brand new can of olives and turn it over and no olives come out,” Harbaugh continued. “They’re packed in there so darn tight, but if you just get one to come out, just pluck one out of there and then they want to come out, they’re just flying out of the jar.

“So, hopefully that’s the case for us defensively. You just wonder, are you ever going to get a turnover, or interception or fumble and how can we get one. Then you get one and then you get, then they start flying your way. So, hopefully that’s where we’re at.”

Turnovers aside, the 49ers pass defense has been solid all season, ranking No. 2 in the NFL through five weeks. San Francisco has allowed 188.8 yards per game against some of the NFL’s best quarterbacks.

The 49ers defense also ranks tied for 10th in the league with six interceptions.

Fourth-year cornerback Tramaine Brock did his best to break the olive jar loose, so to speak, with two interceptions last week against the Houston Texans. Brock’s pair of interceptions, including an 18-yard interception return for a touchdown, put him tied for the team lead along with rookie free safety Eric Reid.

Brock, who has played the past two weeks as the team’s No. 3 cornerback, will likely continue in that role when veteran Nnamdi Asomugha returns from a knee injury.

Harbaugh intimated that on Monday.

“Just really pleased with the way Tramaine’s ascending,” Harbaugh said of the undrafted cornerback who has primarily been a special teams gunner in his NFL career. “When you play like that you’re going to continue to play. So, I think there’s going to be more opportunity for him. We’re excited about that.”

Brock’s improving play has helped the 49ers defense hold opposing quarterbacks to a 67.6 passer rating. But he’s not alone in doing it.

Harbaugh pointed to the entire defensive back group playing sound football.