@Test
public void throwsIllegalStateExceptionWhenFormMessageBodyReaderIsNotAvailable() throws Exception {

    Class<MultivaluedMap> type = MultivaluedMap.class;
    ParameterizedType genericType = newParameterizedType(type, String.class, String.class);
    when(applicationContext.getProviders().getMessageBodyReader(eq(type), eq(genericType), any(), eq(APPLICATION_FORM_URLENCODED_TYPE)))
            .thenReturn(null);
    thrown.expect(IllegalStateException.class);
    formParameterResolver.resolve(parameter, applicationContext);
}