When Joseph’s brothers come to Egypt to buy food due to the famine in Canaan, they encounter Joseph, now the Viceroy of Egypt: “Joseph’s brothers came and they bowed down to him…Joseph saw his brothers and he recognized them, but he acted like a stranger toward them and spoke with them harshly…Joseph recognized his brothers but they did not recognize him. Joseph recalled the dreams that he had dreamed about them, so he said to them, ‘You are spies…” (Gen. 42:7-9)
Joseph had two reasons for making sure that his brothers did not recognize him. First of all he recognized that it was clearly G-d’s plan that he end up in Egypt, become Viceroy, and have the ability to save his family from starvation. Thus his brothers did not deserve the death penalty for having sold him into slavery. They did, however, deserve punishment for their negative intentions. Even though the anticipated result of their action never came to fruition, the intent remains. As a result, Joseph formulated a plan to punish them measure for measure: They had accused him of spying on their activities and reporting back to their father, so he accused them of being spies as well. They had originally ‘imprisoned’ him in a pit with little hope for escape, so he took Shimon as his prisoner, allowing the others to return to Canaan. They had sold him into slavery, so he took Binyamin as his slave.
The second reason for withholding his identity was to test them to determine if their attitude toward him had changed and they actually regretted what they did to him. Joseph arrived at the decision to test them after having eliminated three other possibilities. The first possibility was to never reveal his true identity and to treat them harshly and take his revenge. However, he felt that because so many people were coming from Canaan to buy food, someone else might recognize him. It would be disgraceful for the brothers to find out who he was from a source other than himself. Also, how could he not reveal his identity, knowing how his father was suffering from his absence? Finally, as one who feared G-d, how could he continue to harm his brothers?
The second possibility was to reveal his identity immediately, supply them with adequate provisions and send them back to Canaan without bringing the rest of the family to Egypt. He rejected this because he might be perceived by some evil individuals in Egypt as having dual loyalties. By using Pharaoh’s resources to strengthen his family in Canaan he would be placing himself in grave danger. If war broke out between Egypt and Canaan it would appear that he was aiding the enemy. The third possibility was to bring the entire family to Egypt immediately. However, he was afraid that perhaps the brothers’ jealousy and hatred toward him would continue and they might try once again to kill him, or that they would accuse each other and bring about more hatred. He would find it contemptible to have to witness such destructive behavior in his own family.
Joseph’s plan to test them — which begins with his accusation of spying — is precipitated by his recall of the dreams. Here the Torah emphasizes that the dreams were about them.They were not intended for Joseph. Rather they were intended to inform the brothers that they should not hate him, as they would bow down to him and he would rule over them, but not in the threatening manner that they had imagined. When he saw that one part of the dreams had been fulfilled when they bowed down to him, he needed to find out if his other brother Binyamin and his father were alive so that the possibility would exist for the last part of the dreams to be fulfilled. Then they would finally realize that the dreams were prophetic and there was no basis for their hatred.