#SB-150: Implement indexing for hosted repositories

Re-worked the test case and fixed it.