Is a complex subject anyway.
Testing reality is for example, you perceive something as dangerous, so you get into alert mode.
A healthy person will use the Ego to understand (test reality) if the situation is really dangerous or coming from fear (unconscious).
If is not real danger will act accordingly and relax.
A person with an unhealthy Ego or without the capacity to test reality, will simply react. I am in danger therefore I attack, even if danger is just perceived and not real.
Does it make sense?