### Question:
RegistryAuthenticator { @VisibleForTesting String getAuthRequestParameters( @Nullable Credential credential, Map<String, String> repositoryScopes) { String serviceScope = getServiceScopeRequestParameters(repositoryScopes); return isOAuth2Auth(credential) ? serviceScope + "&client_id=jib.da031fe481a93ac107a95a96462358f9" + "&grant_type=refresh_token&refresh_token=" + Verify.verifyNotNull(credential).getPassword() : serviceScope; } private  RegistryAuthenticator(
      String realm,
      String service,
      RegistryEndpointRequestProperties registryEndpointRequestProperties,
      @Nullable String userAgent,
      FailoverHttpClient httpClient); Authorization authenticatePull(@Nullable Credential credential); Authorization authenticatePush(@Nullable Credential credential);  }### Answer:
@Test public void testAuthRequestParameters_basicAuth() { Assert.assertEquals( "service=someservice&scope=repository:someimage:scope", registryAuthenticator.getAuthRequestParameters( null, Collections.singletonMap("someimage", "scope"))); }
@Test public void testAuthRequestParameters_oauth2() { Credential credential = Credential.from("<token>", "oauth2_access_token"); Assert.assertEquals( "service=someservice&scope=repository:someimage:scope" + "&client_id=jib.da031fe481a93ac107a95a96462358f9" + "&grant_type=refresh_token&refresh_token=oauth2_access_token", registryAuthenticator.getAuthRequestParameters( credential, Collections.singletonMap("someimage", "scope"))); }