testing angular event handlers