@Test
public void testCreateCredentialFromProviderClassFactory()
    throws IOException, GeneralSecurityException {

  Credential credential =
      CredentialFromAccessTokenProviderClassFactory.credential(
          config, ImmutableList.of(TEST_PROPERTY_PREFIX), ImmutableList.of());
  assertThat(credential.getAccessToken()).isEqualTo(TestingAccessTokenProvider.FAKE_ACCESS_TOKEN);
  assertThat(credential.getExpirationTimeMilliseconds())
      .isEqualTo(TestingAccessTokenProvider.EXPIRATION_TIME_MILLISECONDS);
}