When they seized R. Chanina b. Teradyon, it was decreed upon him to be burned together with his Torah scroll. They said to him: It was decreed upon you to be burned together with your Torah scroll — whereupon he recited "The Rock, perfect is His work." They said to his wife: It was decreed upon your husband to be burned together with his Torah scroll, and upon you to be executed — whereupon she recited "He is a G-d of trust, without wrong."
They said to his daughter: It was decreed upon your father to be burned together with his Torah scroll, upon your mother to be executed, and upon you to sit in a hovel of harlots — whereupon she recited (Jeremiah 32:19) "Great in counsel and mighty in deed, Your eyes are open to all the ways of men to give to a man according to his ways and according to the fruit of his deeds." Rebbi said: How great are these righteous ones, who were presented in the time of their affliction with these three verses of vindication of (G-d's) justice (tzidduk hadin), (the likes of) which are not to be found in all of the writings!
All of them directed their hearts (to Heaven) and vindicated His judgment upon them — whereupon a philosopher stood up against his consul, (who had issued the decree, and said to him: Don't let your head swell over having burned the Torah scroll. As soon as you left, it (the Torah) returned to its Father's house. The consul: Tomorrow, your fate will be as theirs. The philosopher: Glad tidings! — Tomorrow, let my portion be with those in the world to come!