@@ -0,0 +1,2022 @@
+package com.fasterxml.jackson.failing;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport com.fasterxml.jackson.databind.*;%0A%0A// for %5Bdatabind#1604%5D%0Apublic class NestedTypes1604Test extends BaseMapTest%0A%7B%0A    public static class Data%3CT%3E %7B%0A        private T data;%0A%0A        public Data(T data) %7B%0A             this.data = data;%0A        %7D%0A%0A        public T getData() %7B%0A             return data;%0A        %7D%0A%0A        public static %3CT%3E Data%3CList%3CT%3E%3E of(List%3CT%3E data) %7B%0A             return new DataList%3C%3E(data);%0A        %7D%0A    %7D%0A%0A    public static class DataList%3CT%3E extends Data%3CList%3CT%3E%3E %7B%0A        public DataList(List%3CT%3E data) %7B%0A            super(data);%0A        %7D%0A    %7D%0A%0A    public static class Inner %7B%0A        private int index;%0A%0A        public Inner(int index) %7B%0A             this.index = index;%0A        %7D%0A%0A        public int getIndex() %7B%0A             return index;%0A        %7D%0A    %7D%0A%0A    public static class BadOuter %7B%0A        private Data%3CList%3CInner%3E%3E inner;%0A%0A        public BadOuter(Data%3CList%3CInner%3E%3E inner) %7B%0A            this.inner = inner;%0A        %7D%0A%0A        public Data%3CList%3CInner%3E%3E getInner() %7B%0A            return inner;%0A        %7D%0A    %7D%0A%0A    public static class GoodOuter %7B%0A        private DataList%3CInner%3E inner;%0A%0A        public GoodOuter(DataList%3CInner%3E inner) %7B%0A            this.inner = inner;%0A        %7D%0A%0A        public DataList%3CInner%3E getInner() %7B%0A            return inner;%0A        %7D%0A    %7D%0A%0A    public void testIssue1604() throws Exception%0A    %7B%0A        final ObjectMapper objectMapper = newObjectMapper();%0A        List%3CInner%3E inners = new ArrayList%3C%3E();%0A        for (int i = 0; i %3C 2; i++) %7B%0A            inners.add(new Inner(i));%0A        %7D%0A        BadOuter badOuter = new BadOuter(Data.of(inners));%0A        GoodOuter goodOuter = new GoodOuter(new DataList%3C%3E(inners));%0A//        String json = objectMapper.writeValueAsString(goodOuter);%0A%0A        // 11-Oct-2017, tatu: Fails with exception wrt type specialization%0A        String json = objectMapper.writeValueAsString(badOuter);%0A        assertNotNull(json);%0A   %7D%0A%7D%0A

Add a failing test for #1604