Message m = control.createMock(Message.class);
m.get(Message.PROTOCOL_HEADERS);
EasyMock.expectLastCall().andReturn(createHeaders());
control.replay();
HttpHeaders h = new HttpHeadersImpl(m);
List<String> acceptValues = h.getRequestHeader("Accept");
assertEquals(3, acceptValues.size());
assertEquals("text/bar;q=0.6", acceptValues.get(0));
assertEquals("text/*;q=1", acceptValues.get(1));
assertEquals("application/xml", acceptValues.get(2));
List<String> contentValues = h.getRequestHeader("Content-Type");
assertEquals(1, contentValues.size());
assertEquals("*/*", contentValues.get(0));
List<String> dateValues = h.getRequestHeader("Date");
assertEquals(1, dateValues.size());
assertEquals("Tue, 21 Oct 2008 17:00:00 GMT", dateValues.get(0));
}