TISTUD-6199 Alloy : Allow to create event handler from View file

Supporting changes for TISTUD-6199

Fixed the tests to avoid setting the mock registry into the global space.