This just now popped into my head. When the Jews receive their messiah sometime in the future, how will you be able to verify that he is a descendant of David?
I suppose it will be assumed based on everything else that occurs. In other words, that condition will be proven by the fullfillement of the other conditions (world peace, rebuilding the Temple, all Jews back in Israel, the whole world worshipping the One God…)
If Meshiach ben Yosef and Meshiach ben David are both considered of the Messianic line, it seems to me that the mummified remains of Joseph (who was buried in Egypt and later translated to Israel) may be found during the coming of the Messiah-- and his mummified/preserved remains may provide some kind of DNA can be tested paternally with anyone claming to be the Messiah.