Testing sinon for mocking