@Test
public void jsonKeyFileUsedWhenConfigured() throws Exception {

  configuration.set(
      getConfigKey(SERVICE_ACCOUNT_JSON_KEYFILE_SUFFIX), getStringPath("test-credential.json"));
  CredentialFactory credentialFactory = getCredentialFactory();
  GoogleCredentialWithRetry credential =
      (GoogleCredentialWithRetry) credentialFactory.getCredential(TEST_SCOPES);
  assertThat(credential.getServiceAccountId()).isEqualTo("test-email@gserviceaccount.com");
  assertThat(credential.getServiceAccountPrivateKeyId()).isEqualTo("test-key-id");
}