The Dreams in the Prison
Genesis 40 · Old Testament

Joseph had risen in Egypt as the slave of Potiphar, an officer of Pharaoh, until his master's wife, refused day after day, seized his garment and used it to accuse him falsely. Potiphar put him in the prison where the king's prisoners were held, and there the keeper came to trust him and placed all the prisoners in his charge. Among them arrived Pharaoh's chief cupbearer and chief baker, each troubled by a dream on the same night, and Joseph told them that interpretations belong to God and asked to hear the dreams. The cupbearer had seen a vine with three branches whose grapes he pressed into Pharaoh's cup, and Joseph said the three branches were three days, after which Pharaoh would restore him to his place. The baker had carried three baskets of bread on his head with birds eating from the top one, and Joseph said those three days would end with Pharaoh hanging him and the birds eating his flesh. Both came to pass exactly as Joseph had said, on Pharaoh's birthday three days later. Joseph had asked the restored cupbearer to remember him and mention him to Pharaoh, and the cupbearer did not remember him but forgot him entirely. The cost was two more years in a cell for a man who had done nothing but tell the truth, twice over.
The passage: Genesis 40.
Source: Genesis 39–40 — the carried text