required sinon and stub function returns obj.