EventCommandMap tests

Added testing of event leaking outside the ECM and injection of events into hooks.

P.S.: some prefer separate pull requests per test, and others consolidated, I'm not sure what you prefer?