### Question:
DefaultHttpClientFactory implements HttpClientFactory { static RequestConfig getRequestConfig(FilterConfig config, String serviceRole) { RequestConfig.Builder builder = RequestConfig.custom(); int connectionTimeout = getConnectionTimeout( config ); if ( connectionTimeout != -1 ) { builder.setConnectTimeout( connectionTimeout ); builder.setConnectionRequestTimeout( connectionTimeout ); LOG.setHttpClientConnectionTimeout(connectionTimeout, serviceRole == null ? "N/A" : serviceRole); } int socketTimeout = getSocketTimeout( config ); if( socketTimeout != -1 ) { builder.setSocketTimeout( socketTimeout ); LOG.setHttpClientSocketTimeout(socketTimeout, serviceRole == null ? "N/A" : serviceRole); } builder.setNormalizeUri(true); return builder.build(); }  @Override HttpClient createHttpClient(FilterConfig filterConfig);  }### Answer:
@Test public void testHttpClientPathNormalization() { GatewayConfig gatewayConfig = createMock(GatewayConfig.class); expect(gatewayConfig.getHttpClientConnectionTimeout()).andReturn(20000).once(); expect(gatewayConfig.getHttpClientSocketTimeout()).andReturn(20000).once(); ServletContext servletContext = createMock(ServletContext.class); expect(servletContext.getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE)).andReturn(gatewayConfig).atLeastOnce(); FilterConfig filterConfig = createMock(FilterConfig.class); expect(filterConfig.getServletContext()).andReturn(servletContext).atLeastOnce(); expect(filterConfig.getInitParameter("httpclient.connectionTimeout")).andReturn(null).once(); expect(filterConfig.getInitParameter("httpclient.socketTimeout")).andReturn(null).once(); replay(gatewayConfig, servletContext, filterConfig); RequestConfig requestConfig = DefaultHttpClientFactory.getRequestConfig(filterConfig, "service"); assertTrue(requestConfig.isNormalizeUri()); verify(gatewayConfig, servletContext, filterConfig); }