public void testGenericWrapper() throws Exception {
  ObjectMapper mapper=new ObjectMapper();
  Wrapper<SimpleBean> result=mapper.readValue("{\"value\": { \"x\" : 13 } }",new TypeReference<Wrapper<SimpleBean>>(){
  }
);
  assertNotNull(result);
  assertEquals(Wrapper.class,result.getClass());
  Object contents=result.value;
  assertNotNull(contents);
  assertEquals(SimpleBean.class,contents.getClass());
  SimpleBean bean=(SimpleBean)contents;
  assertEquals(13,bean.x);
}

public void testGenericWrapper ( ) throws Exception { ObjectMapper mapper = new ObjectMapper ( ) ; Wrapper < SimpleBean > result = mapper . readValue ( "{\"value\": { \"x\" : 13 } }" , new TypeReference < Wrapper < SimpleBean > > ( ) { } ) ; assertNotNull ( result ) ; assertEquals ( Wrapper . class , result . getClass ( ) ) ; Object contents = result . value ; assertNotNull ( contents ) ; assertEquals ( SimpleBean . class , contents . getClass ( ) ) ; SimpleBean bean = ( SimpleBean ) contents ; assertEquals ( 13 , bean . x ) ; }
unit test for verifying fix to [ jackson - 109 ] .
