Genesis 42:1-17
When Jacob learned that there was grain in Egypt, he said to his sons, "Why do you look at one another?" And he said, "Behold, I have heard that there is grain in Egypt; go down and buy grain for us there, that we may live, and not die." So ten of Joseph's brothers went down to buy grain in Egypt. But Jacob did not send Benjamin, Joseph's brother, with his brothers, for he feared that harm might befall him. Thus the sons of Israel came to buy among the others who came, for the famine was in the land of Canaan.
Now Joseph was governor over the land; he it was who sold to all the people of the land. And Joseph's brothers came, and bowed themselves before him with their faces to the ground. Joseph saw his brothers, and knew them, but he treated them like strangers and spoke roughly to them. "Where do you come from?" he said. They said, "From the land of Canaan, to buy food." Thus Joseph knew his brothers, but they did not know him. And Joseph remembered the dreams which he had dreamed of them; and he said to them, "You are spies, you have come to see the weakness of the land." They said to him, "No, my lord, but to buy food have your servants come. We are all sons of one man, we are honest men, your servants are not spies."
He said to them, "No, it is the weakness of the land that you have come to see." And they said, "We, your servants, are twelve brothers, the sons of one man in the land of Canaan; and behold, the youngest is this day with our father, and one is no more." But Joseph said to them, "It is as I said to you, you are spies. By this you shall be tested: by the life of Pharaoh, you shall not go from this place unless your youngest brother comes here. Send one of you, and let him bring your brother, while you remain in prison, that your words may be tested, whether there is truth in you; or else, by the life of Pharaoh, surely you are spies." And he put them all together in prison for three days.