@@ -0,0 +1,1328 @@
+package com.fasterxml.jackson.failing;%0A%0Aimport com.fasterxml.jackson.annotation.*;%0Aimport com.fasterxml.jackson.databind.*;%0A%0Apublic class TestObjectId154 extends BaseMapTest%0A%7B%0A    @JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property=%22@id%22)%0A    public static class BaseEntity %7B  %7D%0A%0A    @JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property=%22@class%22)%0A    public static class Foo extends BaseEntity %7B%0A        public BaseEntity ref;%0A    %7D%0A%0A    public static class Bar extends BaseEntity%0A    %7B%0A        public Foo next;%0A    %7D%0A%0A    public void testObjectAndTypeId() throws Exception%0A    %7B%0A        final ObjectMapper mapper = new ObjectMapper();%0A%0A        Foo foo = new Foo();%0A        Bar bar = new Bar();%0A        foo.ref = bar;%0A        bar.next = foo;%0A%0A        String json = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(bar);%0A%0A        System.out.println(%22JSON: %22+json);%0A        %0A        BaseEntity result = mapper.readValue(json, BaseEntity.class);%0A        assertNotNull(result);%0A        assertTrue(result instanceof Bar);%0A        Bar first = (Bar) result;%0A%0A        assertNotNull(first.next);%0A        assertTrue(first.next instanceof Foo);%0A        Foo second = (Foo) first.next;%0A        assertNotNull(second.ref);%0A        assertSame(first, second.ref);%0A    %7D%0A%7D%0A

Add a unit test for #154