The only constant in life today is changing, and the only thing certain is uncertainty. Try as you may control the future, you cannot. When you expect that certain things will happen and when it doesn't, you tend to become dejected. You expected certainty. On the other hand, if you didn’t have any expectations, an uncertain event will be easier to bear.
The first step to dealing with uncertainty is to accept that we cannot control everything. We can only control our response to the events in life. Instead of expecting life to give you something specific, focus on what you’ll do to create what you want to experience. Just focus on writing the examination, don't focus on the result. Work towards the ways to achieve what you want.
When you expect uncertainty, you tend to prepare for different possibilities. So if one route is blocked, you always take the next route...
All you can do is trust that whatever happens, you can adapt and make the best of it. Develop your self-confidence to handle any uncertainty. Reassure yourself that you can deal with any eventuality.