You're giving a test when you see a question you don't know. But you should because you learnt it just hours ago. 5 times, 10 times. But you dont remember it.
There are methods for controlling your fears, calming down and preventing blackouts. Such as the Feldenkrais method. Others swear meditation could help to get rid of exam anxiety.