@Test
public void resolvesEncodedFormParamAsString() throws Exception {

    when(parameter.isEncoded()).thenReturn(true);
    when(typeProducer.createValue("foo", encodedForm, null)).thenReturn(encodedForm.getFirst("foo"));
    Object resolved = formParameterResolver.resolve(parameter, applicationContext);
    assertEquals(encodedForm.getFirst("foo"), resolved);
    assertThatMessageBodyWriterWasCalled();
}