Insides one of my angularjs controller I am handling $window.onscroll event. Is there any way I can unit test this event? I am calling a service method inside the event. I want to test if the method has been called when the user scrolls the window.