From Talmud Sanhedrin 90b:
The Romans asked Rabbi Yehoshua ben Ḥananya: From where is it derived that the Holy One, Blessed be He, revives the dead, and from where is it derived that He knows what is destined to be? Rabbi Yehoshua ben Ḥananya said to them: Both of those matters are derived from this verse, as it is stated: “And the Lord said to Moses, Behold, you shall lie with your fathers and arise; this people will go astray” (Deuteronomy 31:16). This indicates that Moses will die and then arise from the dead and that the Holy One, Blessed be He, knows what the children of Israel are destined to do. The Romans asked: But perhaps the verse should be divided in a different manner, and it should be read: “Behold, you shall lie with your fathers and this people will arise and go astray after the foreign gods of the land.” Rabbi Yehoshua ben Ḥananya said to them: Take at least a response to half of your question in your hands from that verse, that God knows what is destined to be.