@@ -0,0 +1,2259 @@
+package com.fasterxml.jackson.databind.interop;%0A%0Aimport java.util.Map;%0A%0Aimport com.fasterxml.jackson.core.JsonParser;%0Aimport com.fasterxml.jackson.core.StreamReadCapability;%0Aimport com.fasterxml.jackson.core.util.JacksonFeatureSet;%0Aimport com.fasterxml.jackson.core.util.JsonParserDelegate;%0Aimport com.fasterxml.jackson.databind.*;%0A%0A// Mostly for XML but can be tested via JSON with some trickery%0Apublic class UntypedObjectWithDupsTest extends BaseMapTest%0A%7B%0A    private final ObjectMapper JSON_MAPPER = newJsonMapper();%0A%0A    // For %5Bdataformat-xml#???%5D%0A    public void testDocWithDupsAsUntyped() throws Exception%0A    %7B%0A        _readWriteDocAs(Object.class);%0A    %7D%0A%0A    // For %5Bdataformat-xml#498%5D / %5Bdatabind#3484%5D%0A    public void testDocWithDupsAsMap() throws Exception%0A    %7B%0A//        _readWriteDocAs(Map.class);%0A    %7D%0A%0A    private %3CT%3E void _readWriteDocAs(Class%3CT%3E cls) throws Exception%0A    %7B%0A        final String doc = a2q(%0A                %22%7B'hello': 'world',%5Cn%22%0A                + %22'lists' : 1,%5Cn%22%0A                + %22'lists' : 2,%5Cn%22%0A                + %22'lists' : %7B%5Cn%22%0A                + %22  'inner' : 'internal',%5Cn%22%0A                + %22  'time' : 123%5Cn%22%0A                + %22%7D,%5Cn%22%0A                + %22'lists' : 3,%5Cn%22%0A                + %22'single' : 'one'%5Cn%22%0A                + %22%7D%22);%0A        // This is where need some trickery%0A        T value;%0A        try (JsonParser p = new WithDupsParser(JSON_MAPPER.createParser(doc))) %7B%0A            value = JSON_MAPPER.readValue(p, cls);%0A        %7D%0A%0A        String json = JSON_MAPPER.writeValueAsString(value);%0A        assertEquals(a2q(%0A%22%7B'hello':'world','lists':%5B1,2,%22%0A+%22%7B'inner':'internal','time':123%7D,3%5D,'single':'one'%7D%22),%0A                json);%0A    %7D%0A%0A    /**%0A     * Helper class to fake %22DUPLICATE_PROPERTIES%22 on JSON parser%0A     * (which usually does not expose this).%0A     */%0A    static class WithDupsParser extends JsonParserDelegate%0A    %7B%0A        public WithDupsParser(JsonParser p) %7B%0A            super(p);%0A        %7D%0A%0A        @Override%0A        public JacksonFeatureSet%3CStreamReadCapability%3E getReadCapabilities() %7B%0A            JacksonFeatureSet%3CStreamReadCapability%3E caps = super.getReadCapabilities();%0A            caps = caps.with(StreamReadCapability.DUPLICATE_PROPERTIES);%0A            return caps;%0A        %7D%0A    %7D%0A%7D%0A

Add a test for #3484 (commented out for now)