How could it be that Yosef put his life in danger and sent everyone out of the room, before he revealed to his brothers who he was?
The brothers were just waiting for the right moment - each one his hand on their sword, and then Yosef sends everyone out. Imagine their surprise. - what a fool they were thinking - how could Yosef do such a thing and put his life in so much danger?
I heard today one possible answer: That's exactly what he did. He put his life in danger, - bekavana, with intention, as we recently learned with Tamar. Better to be thrown in the Kivshon Ha Aish (the fiery furnace), then to embarrass another. So that's what Yosef was doing, risking death in order not to embarrass his brothers in front of the Egyptians. (Mitzri)
so, I don't think the brothers thought 'what a fool'...why? because first of all, they themselves knew that they are tzadikim and not anyones' foes; second, if their hands were on their daggers it would have to be in self-defense and having the Head of State send 'his own men' away to be left alone with 'a bunch of tzadikim' would mean, the brothers might be questioning what the heck is going on but at the same time they would be letting down their guard somewhat; 10 against 1 is hardly a threat - however still cautious at not wanting to be tricked once again by 'this Head of State'. So, perhaps to his own guards, Joseph might have seemd to put his life in danger. Joseph totally knew the essence of his brothers, he also knew G-d did not chose 10 'low-life' men to be the progenitors of our inheritance, and from his own level of prophecy, emunah and bitachon (which he experienced and from which he grew while in Mitzrayim) Joseph just plain 'knew' this was just one last move in the unravelling of his identity to his brothers, all tests where now over. His intention worked out, his means did justify the ends, all of them, he needed to put his brothers to the test, it was a test for his brothers, not for Joseph, he already the prophecy, that's why he ended up in Mitzrayim, he says so himself; but his brothers needed to have that last layer of blindness so to speak, removed from their eyes so they could see the light (topic of and in good timing for Chanukah) so they could see the prophecy unravelling itself at that moment, a moment of enlightment,that would give them total clarity and let down the rest of their guard, as well as protecting them from embarrassment - a very strong jewish value.