Testing the closure event listener