This is a common complaint. But there is a distinction between knowing something and having seen it before. Sometimes you may recognize the correct answer; but with real knowledge, you can construct solutions and even reconstruct the theory with your pencil. While most teachers will say that students eventually mature into effective ways of learning, we have very little to guide students in this direction, particularly as reading texts, listening to lectures, and reading notes may tend to reinforce that learning is recognition. To get to the bottom of the problem you may have to reconsider how you study, and find more ways to make studying active rather than passive. Just as sports or music or theater performance require lots of practice before you can ``pull it off under the gun'', mathematics takes a lot of practice and drill -- and adrenalin is not beneficial on mathematics tests. On a practical level, one can, with experience, learn how to anticipate tests. Rewrite your notes, make up review sheets, join a study group, and really study for tests (even if you didn't have to in high school). Your teacher teaches what is important and tests on it; but you must come to tests over-prepared. If you have a serious anxiety problem, discuss it with your teacher; there may be anxiety workshops and specially trained counselors who can help, or your teacher may suggest another solution.