public void testOverwritesAcceptHeaderForXhtml() throws Exception {
XhtmlApplicationState state = new XhtmlApplicationState(null,null,null);
HttpGet get = new HttpGet("http://foo.example.com/");
get.setHeader("Accept","*/*");
URL context = new URL("http://foo.example.com/");
XhtmlResponseHandler rh = new XhtmlResponseHandler(null);
Capture<HttpUriRequest> cap = new Capture<HttpUriRequest>();
EasyMock.expect(mockFactory.get(context)).andReturn(rh);
EasyMock.expect(mockHttpClient.execute(EasyMock.capture(cap),
EasyMock.same(rh)))