Good idea to use a spy.
Where does nameSpy variable come from?