EasyMock.expect(request.getQueryString()).andReturn(query);
EasyMock.expect(request.getHeader("Accept")).andReturn("*/*");
EasyMock.expect(request.getContentType()).andReturn("text/xml charset=utf8").times(2);
EasyMock.expect(request.getAttribute("org.mortbay.jetty.ajax.Continuation")).andReturn(null);
HttpFields httpFields = new HttpFields();
httpFields.add("content-type", "text/xml");
httpFields.add("content-type", "charset=utf8");
httpFields.put(JettyHTTPDestinationTest.AUTH_HEADER, JettyHTTPDestinationTest.BASIC_AUTH);
EasyMock.expect(request.getHeaderNames()).andReturn(httpFields.getFieldNames());
request.getHeaders("content-type");
EasyMock.expectLastCall().andReturn(httpFields.getValues("content-type"));
request.getHeaders(JettyHTTPDestinationTest.AUTH_HEADER);
EasyMock.expectLastCall().andReturn(
httpFields.getValues(JettyHTTPDestinationTest.AUTH_HEADER));
EasyMock.expect(request.getInputStream()).andReturn(is);
request.setHandled(true);
EasyMock.expectLastCall();
response.flushBuffer();