@@ -0,0 +1,1271 @@
+package com.fasterxml.jackson.failing;%0A%0Aimport java.util.List;%0A%0Aimport com.fasterxml.jackson.annotation.JsonProperty;%0Aimport com.fasterxml.jackson.core.type.TypeReference;%0Aimport com.fasterxml.jackson.databind.BaseMapTest;%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0A%0Apublic class TestGenericSubTyping extends BaseMapTest%0A%7B%0A    // Types for %5BJACKSON-778%5D%0A    %0A    static class Document %7B%7D%0A    static class Row %7B%7D%0A    static class RowWithDoc%3CD extends Document%3E extends Row %7B @JsonProperty(%22d%22) D d; %7D%0A    static class ResultSet%3CR extends Row%3E %7B @JsonProperty(%22rows%22) List%3CR%3E rows; %7D%0A    static class ResultSetWithDoc%3CD extends Document%3E extends ResultSet%3CRowWithDoc%3CD%3E%3E %7B%7D%0A%0A    static class MyDoc extends Document %7B%7D%0A%0A    /*%0A    /*******************************************************%0A    /* Unit tests%0A    /*******************************************************%0A     */%0A    %0A    public void testIssue778() throws Exception%0A    %7B%0A        String json = %22%7B%5C%22rows%5C%22:%5B%7B%5C%22d%5C%22:%7B%7D%7D%5D%7D%22;%0A    %0A        ResultSetWithDoc%3CMyDoc%3E rs = new ObjectMapper().readValue(json, new TypeReference%3CResultSetWithDoc%3CMyDoc%3E%3E() %7B%7D);%0A    %0A        Document d = rs.rows.iterator().next().d;%0A    %0A        assertEquals(MyDoc.class, d.getClass()); //expected MyDoc but was Document%0A    %7D    %0A%7D%0A

Add unit test for [JACKSON-778]