public void testListSubClass() throws Exception {
  ObjectMapper mapper=new ObjectMapper();
  ListSubClass result=mapper.readValue("[ \"123\" ]",ListSubClass.class);
  assertEquals(1,result.size());
  Object value=result.get(0);
  assertEquals(StringWrapper.class,value.getClass());
  StringWrapper bw=(StringWrapper)value;
  assertEquals("123",bw.str);
}

public void testListSubClass ( ) throws Exception { ObjectMapper mapper = new ObjectMapper ( ) ; ListSubClass result = mapper . readValue ( "[ \"123\" ]" , ListSubClass . class ) ; assertEquals ( 1 , result . size ( ) ) ; Object value = result . get ( 0 ) ; assertEquals ( StringWrapper . class , value . getClass ( ) ) ; StringWrapper bw = ( StringWrapper ) value ; assertEquals ( "123" , bw . str ) ; }
verifying that sub - classing works ok wrt generics information
