code: static RestTemplate createRestTemplate(CredHubProperties properties,
  										   ClientHttpRequestFactory clientHttpRequestFactory,
  										   ClientRegistrationRepository clientRegistrationRepository,
  										   OAuth2AuthorizedClientService authorizedClientService) {
  		RestTemplate restTemplate = new RestTemplate();
  
  		configureRestTemplate(restTemplate, properties.getUrl(), clientHttpRequestFactory);
  		configureOAuth2(restTemplate, clientHttpRequestFactory,
  				properties.getOauth2().getRegistrationId(),
  				clientRegistrationRepository,
  				authorizedClientService);
  
  		return restTemplate;
  	}
docs: Create a {@link RestTemplate} configured for communication with a CredHub server.
  
  @param properties                   CredHub connection properties
  @param clientHttpRequestFactory     the {@link ClientHttpRequestFactory} to use when
  creating new connections
  @param clientRegistrationRepository a repository of OAuth2 client registrations
  @param authorizedClientService      a repository of authorized OAuth2 clients
  @return a configured {@link RestTemplate}