Refactor tenants default source.
Add test for default tenants soruce.