But you must remain calm, no matter what the problem. If you panic, become consumed with fear, or get angry, you will fail the test. The problem will remain longer than it needs to and could even become compounded by your negative reaction. You must be aware of your feelings. The moment you feel any negative reaction to any situation or circumstance, catch yourself. If you don't, you will be drawn down the negative vortex of "ego-consciousness", which will make it more difficult to recover from.
This takes practice, because it goes against what we have been taught and what we see almost everyone around us practice. It goes against our primal instinct of "fight or flight". To achieve a constant awareness of your thoughts, you must meditate daily, even if only for 15 minutes or so. By repeated daily meditation you will condition your mind to be self-aware. If you want to excel at anything, doesn't it takes repetitive practice?
The yogi says, "Be free within. Know God as your provider and don't live in poverty-consciousness." Always live in prosperity-consciousness.