Mocking with sinonjs