@Test
public void retrievesHeaderFromRequest() throws Exception {

    when(typeProducer.createValue("foo", headers, null)).thenReturn(headers.getFirst("foo"));
    Object resolvedHeader = headerParameterResolver.resolve(parameter, applicationContext);
    assertEquals(headers.getFirst("foo"), resolvedHeader);
}