Fix tests by adding sinon