tests - methods toHaveBeenCalled(), rootScope.$broadcast and rootScope.$on