Adding test for _listRepository for http url + refactoring