@Test
public void testSelectDelegationToken() throws Exception {

  final Credentials creds = new Credentials();
  creds.addToken(new Text(providerUriString), token);
  assertNull(KMSClientProvider.selectDelegationToken(creds, null));
  assertNull(KMSClientProvider
      .selectDelegationToken(creds, new Text(oldTokenService)));
  assertEquals(token, KMSClientProvider
      .selectDelegationToken(creds, new Text(providerUriString)));
}