use of org.springframework.cloud.netflix.zuul.filters.route.apache.HttpClientRibbonCommand in project spring-cloud-netflix by spring-cloud.
the class ZuulApacheHttpClientConfigurationTests method testRibbonLoadBalancingHttpClient.
@Test
public void testRibbonLoadBalancingHttpClient() {
RibbonCommandContext context = new RibbonCommandContext("foo", " GET", "http://localhost", false, new LinkedMultiValueMap<>(), new LinkedMultiValueMap<>(), null, new ArrayList<>(), 0l);
HttpClientRibbonCommand command = httpClientRibbonCommandFactory.create(context);
RibbonLoadBalancingHttpClient ribbonClient = command.getClient();
CloseableHttpClient httpClient = getField(ribbonClient, "delegate");
MockingDetails httpClientDetails = mockingDetails(httpClient);
assertTrue(httpClientDetails.isMock());
}
Aggregations