@VisibleForTesting
  boolean isOAuth2Auth(@Nullable Credential credential) {
    return credential != null && credential.isOAuth2RefreshToken();
  }
@Test
  public void isOAuth2Auth_basicAuth() {
    Credential credential = Credential.from("name", "password");
    Assert.assertFalse(registryAuthenticator.isOAuth2Auth(credential));
  }