@Test
public void retrievesDefaultValueWhenHeaderDoesNotPresentInRequest() throws Exception {

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