Fixing failed CLI tests for Repositories.

Repositories support has changed in these last few days so I had to
update the factory method. Tests look ok.