It is written: “And set it in the ears of Joshua” (Exodus 17:14), this is one of four righteous people to whom a portent was given; two sensed it and two did not sense it. A portent was given to Moses, but he did not sense it. A portent was given to Jacob, but he did not sense it. A portent was given to David and Mordekhai, and they sensed it. Jacob – the Holy One blessed be He said to him: “I will protect you wherever you go” (Genesis 28:15), and he was frightened. A person to whom the Holy One blessed be He made a promise was frightened, as it is written: “He was frightened” (Genesis 32:8)? Rather, he said: Perhaps when I was in the house of Laban the impure, I became sullied with impurity.Moses – “and set it in the ears of Joshua,” indicating that Joshua will lead Israel into the land. And it is written: “I pleaded with the Lord [… please let me cross over and see the good land on the other side of the Jordan]” (Deuteronomy 3:23-25).However, David and Mordekhai were given a portent and they sensed it. David said: “Your servant has smitten both the lion and the bear” (I Samuel 17:36). David said: Am I so important that I was able to smite these wild beasts? Rather, he said: Perhaps an event is destined to befall Israel, and they are destined to be rescued by me. Mordekhai – “Mordekhai would walk before the courtyard of the harem” (Esther 2:11). He said: Is it possible that this righteous one [Esther] will mary an uncircumcised man? Rather, a great event is destined to befall Israel and they are destined to be rescued by her.