Miroslav Klose broke Germany's all-time scoring record with one of five goals for the Mannschaft in the final 18 minutes of their final FIFA World Cup warm-up match.
After a goalless first half in Mainz, André Schürrle put the hosts ahead before Henrikh Mkhitaryan converted a penalty to level. However, Germany moved through the gears late on and blew away the visitors with goals from Lukas Podolski, Benedikt Höwedes and Klose supplemented by a late Mario Götze double.
Schürrle spurned the first chance, heading wide a pinpoint cross by Philipp Lahm after nine minutes, and Marco Reus had an effort cleared off the line by Hrayr Mkoyan. Reus burst through on goal on the half hour but was foiled by goalkeeper Roman Berezovski, and the Germany schemer's frustration increased as he limped off just before the interval with an ankle injury and was taken to the hospital.
Podolski replaced Reus and was quickly to the fore as he received a fine pass from Toni Kroos six minutes after the break and centred to find Schürrle, the Chelsea FC midfielder cleverly flicking his finish past Berezovski. Mesut Özil was denied by the post before fellow substitute Kevin Grosskreutz brought down Mkhitaryan in the penalty box and his Borussia Dortmund team-mate converted the spot kick to pull Armenia level.
Podolski immediately restored Germany's lead with a shot from an acute angle (72) and Höwedes converted the rebound after his header was parried 60 seconds later. Klose's landmark moment arrived as a diving header on 77 minutes ensured he overhauled Gerd Müller's milestone and Götze (82 & 90) added further gloss.
Joachim Löw's men start their World Cup bid against Portugal on 16 June before taking on Ghana and the United States in Group G.