Refactoring SalesforceResourceOwner and simplifying its tests