when(apacheHeader2.getName()).thenReturn("Content-type");
when(apacheHeader2.getValue()).thenReturn("application/xml");
when(response.getAllHeaders()).thenReturn(new org.apache.http.Header[] {header,apacheHeader2});
Headers headers = new ApacheHeaders(response,client);
for(Header h : headers) {
System.out.println(h.getName());
System.out.println(h.getValue());
}
Iterator<Header> iterator = headers.iterator();
Header header = iterator.next();
assertThat("Accept", is(equalTo(header.getName())));
assertThat("application/xml", is(equalTo(header.getValue())));