Add CredentialsProviderImpl test, refactor existing test for some reuse
Merge commit '0cddb10d506617a4c3d4865a7b03ab24d89d59c7' into HEAD