Imam Muhammad al-Baqir (a.s.) said: In the Master of this affair (Imam Mahdi (a.t.f.s.) are present practices (Sunnah) of four prophets: Moosa, Isa, Yusuf and Muhammad (s.a.w.s.). From Moosa is being fearful for his life and his occultation, from Yusuf is the imprisonment, from Isa it is that it would be said: He is dead, while it would not be so. And as for the similarity with Muhammad (s.a.w.s.) it will be his advent and rising up with the sword.
Kamaal al-Deen v 1 p 326