Introduce onEvent() to improve testability

...and prepare for the future

Change-Id: Ieed96ab552993fd148e80b9c3355f1b569bd716f
2 files changed