title: RestEasy : org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token(..)
body: <p>I have a rest endpoint which returns <code>List&lt;VariablePresentation&gt;</code>. I am trying to test this rest endpoint as  </p>
  
  <pre><code>    @Test
      public void testGetAllVariablesWithoutQueryParamPass() throws Exception {
          final ClientRequest clientCreateRequest = new ClientRequest("http://localhost:9090/variables");
          final MultivaluedMap&lt;String, String&gt; formParameters = clientCreateRequest.getFormParameters();
          final String name = "testGetAllVariablesWithoutQueryParamPass";
          formParameters.putSingle("name", name);
          formParameters.putSingle("type", "String");
          formParameters.putSingle("units", "units");
          formParameters.putSingle("description", "description");
          formParameters.putSingle("core", "true");
  
          final GenericType&lt;List&lt;VariablePresentation&gt;&gt; typeToken = new GenericType&lt;List&lt;VariablePresentation&gt;&gt;() {
          };
          final ClientResponse&lt;List&lt;VariablePresentation&gt;&gt; clientCreateResponse = clientCreateRequest.post(typeToken);
          assertEquals(201, clientCreateResponse.getStatus());
          final List&lt;VariablePresentation&gt; variables = clientCreateResponse.getEntity();
          assertNotNull(variables);
          assertEquals(1, variables.size());
  
      }
  </code></pre>
  
  <p>This test fails with error saying  </p>
  
  <pre><code>org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token(..)
  </code></pre>
  
  <p>How can I fix this issue?</p>