@Test
public void retrievesDefaultValueWhenQueryParameterDoesNotPresentInRequest() throws Exception {

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