Make getProvider public for testing purposes.