Change IReferenceSourceProvider to accept indexId

In preparation for unit tests
Tests: Add full integration test