Add tests for the event listener and remove the @codeCoverageIgnore tags