{42:9} And remembering the dreams, which he had seen in another time, he said to them: “You are scouts. You have come in order to see which parts of the land are weaker.”
{42:10} And they said: “It is not so, my lord. But your servants have arrived in order to buy food.
{42:11} We are all sons of one man. We have come in peace, nor do any of your subjects devise evil.”

Joseph recognized them but he wanted to confirm it by their brothers' own word.

{42:12} And he answered them: “It is otherwise. You have come to examine the unguarded parts of this land.”
{42:13} But they said: “We, your servants, are twelve brothers, the sons of one man in the land of Canaan. The youngest is with our father; the other is not living.”
{42:14} He said: “This is just as I have said. You are scouts.
{42:15} I will now continue to put you to the test. By the health of Pharaoh, you will not depart from here, until your youngest brother arrives.
{42:16} Send one of you and bring him. But you will be in chains, until what you have said is proven to be either true or false. Otherwise, by the health of Pharaoh, you are scouts.”
{42:17} Therefore, he delivered them into custody for three days.
{42:18} Then, on the third day, he brought them out of prison, and he said: “Do as I have said, and you will live. For I fear God.
{42:19} If you are peaceful, let one of your brothers be bound in prison. Then you may go away and carry the grain that you have bought to your houses.
{42:20} And bring your youngest brother to me, so that I may be able to test your words, and you may not die.” They did as he had said,

These brothers saw themselves in trouble because they knew that their father Jacob would not let his youngest son, Benjamin, be released from him after of what happened to Joseph, the other son with his beloved wife Raquel who by now has passed away.