Add tests for RepositoryCtrl