NEW YORK -- The weekend began with New York Mets manager Terry Collins wondering when he would give right-hander Jenrry Mejia the final test -- pitching on three consecutive days -- in his audition for the Mets' vacant closer's job.

On Sunday, though, Mejia took and passed an arguably bigger test by pitching in both ends of the Mets' doubleheader against the Arizona Diamondbacks.

Mejia took the loss in the first game, when he gave up an unearned run in the ninth inning. Four hours later, he took the mound with a two-run lead in the ninth inning of the nightcap and worked around a two-out hit to earn his third save as the Mets salvaged a split of the twin bill with a 4-2 win.

After throwing 21 pitches in the opener, Mejia told pitching coach Dan Warthen early in the second game that he would be available if a save situation arose.

"He's the one who wanted to go out and pitch," Collins said.

Pitching twice in a day was a major hurdle to clear for Mejia, who was initially hesitant to move from the rotation -- where he 3-0 with a 5.06 ERA in seven starts this season -- because he believed pitching in relief in 2010 led to the Tommy John surgery he underwent in 2011.

However, Mejia is thriving since the shift. He has allowed just the unearned run in 7 1/3 innings over seven relief appearances, during which he has surrendered seven hits and one walk while striking out eight.

"I think (pitching twice Sunday) says a lot that he's healthier (and) that he's starting to realize that he can bounce back, that he can do more than what he first thought," Collins said.