@@ -0,0 +1,2236 @@
+package com.fasterxml.jackson.failing;%0A%0Aimport com.fasterxml.jackson.annotation.JsonTypeInfo;%0Aimport com.fasterxml.jackson.databind.*;%0A%0Apublic class TestTreeWithType extends BaseMapTest%0A%7B%0A    public static class Foo %7B%0A        public String bar;%0A%0A        public Foo() %7B %7D%0A%0A        public Foo(String bar) %7B%0A            this.bar = bar;%0A        %7D%0A    %7D%0A    %0A    /*%0A    /**********************************************************%0A    /* Unit tests%0A    /**********************************************************%0A     */%0A%0A    private final ObjectMapper mapper = new ObjectMapper();%0A%0A    public void testValueAsStringWithoutDefaultTyping() throws Exception %7B%0A%0A        Foo foo = new Foo(%22baz%22);%0A        String json = mapper.writeValueAsString(foo);%0A%0A        JsonNode jsonNode = mapper.readTree(json);%0A        assertEquals(jsonNode.get(%22bar%22).textValue(), foo.bar);%0A    %7D%0A%0A    public void testValueAsStringWithDefaultTyping() throws Exception %7B%0A        mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY);%0A%0A        Foo foo = new Foo(%22baz%22);%0A        String json = mapper.writeValueAsString(foo);%0A%0A        JsonNode jsonNode = mapper.readTree(json);%0A        assertEquals(jsonNode.get(%22bar%22).textValue(), foo.bar);%0A    %7D%0A%0A    public void testReadTreeWithDefaultTyping() throws Exception%0A    %7B%0A        final String CLASS = Foo.class.getName();%0A%0A        mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL,%0A                JsonTypeInfo.As.PROPERTY);%0A        String json = %22%7B%5C%22@class%5C%22:%5C%22%22+CLASS+%22%5C%22,%5C%22bar%5C%22:%5C%22baz%5C%22%7D%22;%0A        JsonNode jsonNode = mapper.readTree(json);%0A        assertEquals(jsonNode.get(%22bar%22).textValue(), %22baz%22);%0A    %7D%0A%0A    public void testValueToTreeWithoutDefaultTyping() throws Exception %7B%0A%0A        Foo foo = new Foo(%22baz%22);%0A        JsonNode jsonNode = mapper.valueToTree(foo);%0A        assertEquals(jsonNode.get(%22bar%22).textValue(), foo.bar);%0A    %7D%0A%0A    public void testValueToTreeWithDefaultTyping() throws Exception %7B%0A        mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY);%0A%0A        Foo foo = new Foo(%22baz%22);%0A        JsonNode jsonNode = mapper.valueToTree(foo);%0A        assertEquals(jsonNode.get(%22bar%22).textValue(), foo.bar);%0A    %7D%0A%7D%0A

Add unit tests for [Issue#88]