Testing an event listener