Use sinon to stub method