Rav Yehuda says that Rav says: A person should never bring himself to undergo an ordeal, as David, king of Israel, brought himself to undergo an ordeal and failed. David said before God: Master of the Universe, for what reason does one say in prayer: God of Abraham, God of Isaac, and God of Jacob, and one does not say: God of David? God said to David: They have undergone ordeals before Me, and you have not undergone an ordeal before Me. David said before Him: Examine me and subject me to an ordeal, as it is stated: “Examine me, Lord, and subject me to an ordeal; try my kidneys and my heart” (Psalms 26:2). God said to him: I will subject you to an ordeal, and I will perform a matter for you that I did not perform for the Patriarchs, as for them, I did not inform them of the nature of the ordeal, while I am informing you that I will subject you to an ordeal involving a matter of a married woman, with whom relations are forbidden.