@Test
	void testRequestFactorySetWithRestTemplateBuilderSupplier() {
		// Gateway Server WebMVC sets Redirects.DONT_FOLLOW, gh-4423
		RestTemplateBuilder builder = new RestTemplateBuilder()
			.requestFactorySettings(new ClientHttpRequestFactorySettings(HttpRedirects.DONT_FOLLOW, null, null, null));
		transportClientFactory = new RestTemplateTransportClientFactory(Optional.empty(), Optional.empty(),
				new DefaultEurekaClientHttpRequestFactorySupplier(), () -> builder);
		EurekaHttpClient eurekaHttpClient = transportClientFactory
			.newClient(new DefaultEndpoint("http://localhost:8761"));
		RestTemplateEurekaHttpClient restTemplateEurekaHttpClient = (RestTemplateEurekaHttpClient) eurekaHttpClient;
		RestTemplate restTemplate = restTemplateEurekaHttpClient.getRestTemplate();
		ClientHttpRequestFactory requestFactory = restTemplate.getRequestFactory();
		if (requestFactory instanceof InterceptingClientHttpRequestFactory interceptingClientHttpRequestFactory) {
			requestFactory = interceptingClientHttpRequestFactory.getDelegate();
		}
		assertThat(requestFactory).isInstanceOf(HttpComponentsClientHttpRequestFactory.class);
	}
@author Daniel Lavoie
@author Wonchul Heo
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/http/RestTemplateTransportClientFactoryTests.java