While this may seem dumb, study high -> take the test high. Study sober -> take the test sober. I rarely study high because I feel like I am less efficient and easily distracted, even if it is more fun. But on those rare occasions if I've studied primarily under the influence, I vape a bit right before the exam. For me, its easier to remember the things I've studied in the high mindset during an exam if I am high during the exam as well. But overall, I just don't study high, and vape after I finish all my work for the day.