I dont look for this to happen. If Tehran does an underground test of a nuclear device it makes them outright liars, It states in no uncertain terms that they arent looking for Nuclear energy, but nuclear war. It would send a message to all that Iran has become to dangerous to be allowed to exist as it is now.
I believe an underground explosion of a nuclear test would force the rest of the world to take Iran by force .I think even France and Germany at that point would stop waving the white flags.
Iran's first test of Nuclear Weapon will be a "live" test over Israel....
Iran knows they have one chance to take out the bulk of Israels response. The Muslim plan is that there are more Muslims than Jews, and we already know that they consider martyrdom for "the cause" to be acceptable ... even if it isnt voluntary.