removed log
fixed test using spyOn