Pharaoh sent and called for all the wise men of Egypt, and they came, and the angel Gabriel was disguised as one of them. When they were asked their opinion in the matter, Gabriel spoke up, and said: "If it please the king, let him place an onyx stone before the child, and a coal of fire, and if he stretches out his hand and grasps the onyx stone, then shall we know that the child hath done with wisdom all that he bath done, and we will slay him. But if he stretches out his hand and grasps the coal of fire, then shall we know that it was not with consciousness that he did the thing, and he shall live."
Gabriel Sat Among Pharaoh's Wise Men in Disguise
Legends of the Jews 4:77