@Test
public void createsObjectFromDefaultValueWhenFormParamNotFound() throws Exception {

    when(parameter.isEncoded()).thenReturn(false);
    when(parameter.getDefaultValue()).thenReturn("default value");
    when(typeProducer.createValue("foo", decodedForm, "default value")).thenReturn("default value");
    Object resolved = formParameterResolver.resolve(parameter, applicationContext);
    assertEquals("default value", resolved);
    assertThatMessageBodyWriterWasCalled();
}