Package com.github.kristofa.test.http.client

Examples of com.github.kristofa.test.http.client.ApacheHttpClientImpl


            }

        }

        private HttpClientResponse<InputStream> forward(final FullHttpRequest request) throws HttpRequestException {
            final HttpClient client = new ApacheHttpClientImpl();
            return client.execute(request);
        }
View Full Code Here


        when(mockRequest.getUrl()).thenReturn(URL);
        final Set<HttpMessageHeader> headers = new HashSet<HttpMessageHeader>();
        headers.add(new HttpMessageHeader(HttpMessageHeaderField.CONTENTTYPE.getValue(), CONTENT_TYPE));
        when(mockRequest.getHttpMessageHeaders()).thenReturn(headers);

        serviceInvoker = new ApacheHttpClientImpl() {

            /* package */@Override
            org.apache.http.client.HttpClient getClient() {
                return mockHttpClient;
            }
View Full Code Here

        verifyNoMoreInteractions(mockConnectionManager);
    }

    @Test
    public void testGetClient() {
        final ApacheHttpClientImpl httpServiceInvoker = new ApacheHttpClientImpl();
        final org.apache.http.client.HttpClient client = httpServiceInvoker.getClient();
        assertNotNull(client);
        client.getConnectionManager().shutdown();
    }
View Full Code Here

TOP

Related Classes of com.github.kristofa.test.http.client.ApacheHttpClientImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.