@Test
public void p12KeyFileUsedWhenConfigured() throws Exception {

  configuration.set(getConfigKey(SERVICE_ACCOUNT_EMAIL_SUFFIX), "foo@example.com");
  configuration.set(getConfigKey(SERVICE_ACCOUNT_KEYFILE_SUFFIX), getStringPath("test-key.p12"));
  CredentialFactory credentialFactory = getCredentialFactory();
  GoogleCredentialWithRetry credential =
      (GoogleCredentialWithRetry) credentialFactory.getCredential(TEST_SCOPES);
  assertThat(credential.getServiceAccountId()).isEqualTo("foo@example.com");
}