@Before public void setUp() throws Exception { fetcher = new BasicHttpFetcher(BASE_URL.getAuthority()); mockInputStream = EasyMock.createMock(InputStream.class); EasyMock.expect(mockInputStream.available()).andReturn(0); mockInputStream.close(); mockEntity = EasyMock.createMock(HttpEntity.class); EasyMock.expect(mockEntity.getContent()).andReturn(mockInputStream); EasyMock.expect(mockEntity.getContentLength()).andReturn(16384L).anyTimes(); }
@Before public void setUp() throws Exception { svcLookup = new DefaultRpcServiceLookup(new DefaultServiceFetcher(null, new BasicHttpFetcher(null)), 60l); socialEndpoint = "http://localhost:8080/social/rpc"; host = "localhost:8080"; }
@Before public void setUp() throws Exception { fetcher = new BasicHttpFetcher(BASE_URL.getAuthority()); mockInputStream = EasyMock.createMock(InputStream.class); EasyMock.expect(mockInputStream.available()).andReturn(0); mockInputStream.close(); mockEntity = EasyMock.createMock(HttpEntity.class); EasyMock.expect(mockEntity.getContent()).andReturn(mockInputStream); EasyMock.expect(mockEntity.getContentLength()).andReturn(16384L).anyTimes(); }
@Before public void setUp() throws Exception { fetcher = new BasicHttpFetcher(BASE_URL.getAuthority()); mockInputStream = EasyMock.createMock(InputStream.class); EasyMock.expect(mockInputStream.available()).andReturn(0); mockInputStream.close(); mockEntity = EasyMock.createMock(HttpEntity.class); EasyMock.expect(mockEntity.getContent()).andReturn(mockInputStream); EasyMock.expect(mockEntity.getContentLength()).andReturn(16384L).anyTimes(); }
@Before public void setUp() throws Exception { svcLookup = new DefaultRpcServiceLookup(new DefaultServiceFetcher(null, new BasicHttpFetcher(null)), 60l); socialEndpoint = "http://localhost:8080/social/rpc"; host = "localhost:8080"; }
@Before public void setUp() throws Exception { svcLookup = new DefaultRpcServiceLookup(new DefaultServiceFetcher(null, new BasicHttpFetcher(null)), 60l); socialEndpoint = "http://localhost:8080/social/rpc"; host = "localhost:8080"; }
HttpFetcher fetcher = new BasicHttpFetcher(httpProxy); HttpResponse response = fetcher.fetch(request);
HttpFetcher fetcher = new BasicHttpFetcher(httpProxy); HttpResponse response = fetcher.fetch(request);
HttpFetcher fetcher = new BasicHttpFetcher(httpProxy); HttpResponse response = fetcher.fetch(request);