Memory can improve when a test recreates how you learned
Stress while learning can make something harder to remember later. But bringing back parts of the original learning situation during a test can reduce this loss. Memory depends partly on the conditions in which it was formed, not only on the information itself.