Before the test do as TheMindGarage said. If you still freak out during the test, try drawing number 8 on your hand, use pencil to draw flower on the paper or any other stupid things, even if it is embarrassing or you think it won't help. It helps because you will entirely focus on the ridiculous thing you are doing, realised you have wasted time and go back.