Jubilees 39
4And the Egyptian committed everything into the hands of Joseph; for he saw that the Lord was with him, and that the Lord prospered him in all that he did.
6But he did not surrender his soul, and he remembered the Lord and the words which Jacob, his father, used to read from amongst the words of Abraham, that no man should commit fornication with a woman who has a husband; that for him the punishment of death has been ordained in the heavens before the Most High God, and the sin will be recorded against him in the eternal books continually before the Lord.
7And Joseph remembered these words and refused to lie with her.
8And she besought him for a year, but he refused and would not listen.
10And the woman saw that he would not lie with her, and she calumniated him in the presence of his lord, saying 'Thy Hebrew servant, whom thou lovest, sought to force me so that he might lie with me; and it came to pass when I lifted up my voice that he fled and left his garment in my hands when I held him, and he brake through the door.'
12And he was there in the prison; and the Lord gave Joseph favour in the sight of the chief of the prison guards and compassion before him, for he saw that the Lord was with him, and that the Lord made all that he did to prosper.
13And he committed all things into his hands, and the chief of the prison guards knew of nothing that was with him, for Joseph did every thing, and the Lord perfected it.
15And the chief of the prison guards appointed Joseph to serve them; and he served before them.
16And they both dreamed a dream, the chief butler and the chief baker, and they told it to Joseph.
17And as he interpreted to them so it befell them, and Pharaoh restored the chief butler to his office and the (chief) baker he slew, as Joseph had interpreted to them.
18But the chief butler forgot Joseph in the prison, although he had informed him what would befall him, and did not remember to inform Pharaoh how Joseph had told him, for he forgot.