Get documentProvider.retrieve func and tests