The idea of brake testing:
1. you make it more difficult for the guy behind you, in a faster car, to get past you. See my earlier posts for a more detailed explanation.
2. If the guy behind you decides to risk it, he will gently nudge his nose into your diffuser. Generally, the rear of an F1 car is a lot stronger than the nose cone, hence, he loses his nose cone and goes into the pits, while you continue on your merry way. Post-race, there will be a lot of noises, but you can deal with the aftermath.
3. Keep in mind that you shouldnt make brake-testing a habit. You use this technique in addition to all the other legal means of defending your position.
Its similar to how when footballers dive for a penalty or free-kick: it can backfire on you, but its a risk you take. You dont base your entire game plan on diving, but it is a good tool to have, if you are desperate.
Barrichello was out of order during that race, where he was behaving as if Piquet should move out of his way. Granted, Barrichello was in a Brawn - the fastest car in the field - but he has no right to demand that people get out of his way. Alonso or Hamilton might be able to do this, as their reputation preceeds them, but Barrichello - I dont think so. On seeing his demands, I would've brake-tested him for 2-3 corners in the proceeding laps, just to frustrate him a little more. He would've got by me eventually though.