If I make a ברכה on a Hershey bar, and before I eat the food, I realize I am Fleishig, what do I do? (assuming I have no other food around?)
Rav Eliezer Melamed says that if the meat meal is finished and it is a matter of waiting the prescribed time (6 hours) then one should taste the hershey bar (or ice cream in his example) and rely on the Rishonim that say you don't have to wait rather than make a Beracha for no reason.
This does not apply when one is in middle of a meat meal, as there is no leniency to rely on to permit eating something dairy.
It's a machloket Rambam/Tosfot on the nature of bracha levatala- is it deoraita or derabanan? If it's derabanan, it's better to have been over the issur of bracha levatala than to actively be over the issur of milk after meat. If it's deoraita, one of course shouldn't be over the deoraita of bracha levatala and should taste the milk, then being over on the derabanan of milk after meat.
See this excellent article by Rav Chaim Navon from Har Etzion on the topic: http://www.etzion.org.il/he/שיעור-2-ברכה-לבטלה . He gives a great summary of the relevant opinions. Note the very powerful question asked by the Nishmat Adam on the Rambam.
In the Sheelas Uteshuvos of the Yabia Omer Yoreh Deah chelek bet siman hey, it's noted that after much deliberation he believes even Tosfot, who holds making a bracha levatala is derabanan (and seemingly it is thus adif to not eat the milchik as you would be over on the oseh maaseh derabanan of eating milk after meat) would agree that one must at least try a little bit of the food. He concludes that mikol makom one should taste their food in an instance of a possible bracha levatala.