Bug 895526 - Part 0: refactor TestUpgradeRequired.
Bug 895526 - Part 1: EndOfLifeHandler.