updated test; spyOn and andCallFake is now used