Some of the greatest discoveries have been made through serendipity. So, too, learning moments are occasionally stumbled upon inadvertently. A teacher should feast on these, follow their flow, be humble before them. But little can be done about it except to teach for surprise. Teachers who structure too tightly where they think the learner's mind should go may be involved in conditioning, rather than learning.
Tests are a very poor indicator of whether an individual has really learned something.
The main reason for this is that, except for disciplines which are extremely abstract and theoretical, tests provide an artificial context for demonstrating one's knowledge. They seldom address the real world. By the same token, wrong or misguided answers are far more revealing than correct ones. A teacher who follows up why a student answered the way she did may learn something valuable about that student's mind, as well as the context in which that mind functions. All of these interconnected truths are general enough to apply to learning of any kind.