Moved fake API to use sinon