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