@Test
public void customTokenServerUrl() throws Exception {

  configuration.set(
      getConfigKey(SERVICE_ACCOUNT_JSON_KEYFILE_SUFFIX), getStringPath("test-credential.json"));
  configuration.set(getConfigKey(TOKEN_SERVER_URL_SUFFIX), "https://test.oauth.com/token");
  CredentialFactory credentialFactory = getCredentialFactory();
  GoogleCredentialWithRetry credential =
      (GoogleCredentialWithRetry) credentialFactory.getCredential(TEST_SCOPES);
  assertThat(credential.getTokenServerEncodedUrl()).isEqualTo("https://test.oauth.com/token");
}