@@ -0,0 +1,1854 @@
+package com.fasterxml.jackson.failing;%0A%0Aimport com.fasterxml.jackson.databind.*;%0Aimport com.fasterxml.jackson.databind.node.ArrayNode;%0Aimport com.fasterxml.jackson.databind.node.ObjectNode;%0A%0A// %5Bdatabind#3338%5D%0Apublic class ArrayNode3338MergeTest extends BaseMapTest%0A%7B%0A    public void testEnabledArrayNodeMerge() throws Exception %7B%0A        final ObjectMapper mapperWithMerge = sharedMapper();%0A%0A        JsonNode merged = _updateTree(mapperWithMerge);%0A%0A        ObjectNode expected = mapperWithMerge.createObjectNode();%0A        expected.put(%22number%22, 888);%0A%0A        // default behavior is to enable merge, so we get all elements%0A        ArrayNode array = expected.putArray(%22array%22);%0A        array.add(%22Mr.%22);%0A        array.add(%22Ms.%22);%0A        array.add(%22Mister%22);%0A        array.add(%22Miss%22);%0A%0A        assertEquals(expected, merged);%0A    %7D%0A%0A    public void testDisabledArrayNodeMerge() throws Exception %7B%0A        ObjectMapper mapperNoMerge = jsonMapperBuilder()%0A                .withConfigOverride(ArrayNode.class,%0A                        cfg -%3E cfg.setMergeable(false))%0A                .build();%0A%0A        JsonNode merged = _updateTree(mapperNoMerge);%0A%0A        ObjectNode expected = mapperNoMerge.createObjectNode();%0A        ArrayNode array = expected.putArray(%22array%22);%0A        array.add(%22Mister%22);%0A        array.add(%22Miss%22);%0A        expected.put(%22number%22, 888);%0A%0A        assertEquals(expected, merged);%0A    %7D%0A%0A    private JsonNode _updateTree(ObjectMapper mapper) throws Exception%0A    %7B%0A        JsonNode mergeTarget = mapper.readTree(a2q(%22%7B%22%0A                + %22'array': %5B'Mr.', 'Ms.' %5D,%22%0A                + %22'number': 888%22%0A                + %22%7D%22));%0A        JsonNode updateNode = mapper.readTree(a2q(%22%7B%22%0A                + %22'array': %5B'Mister', 'Miss' %5D%22%0A                + %22%7D%22));%0A       return mapper.readerForUpdating(mergeTarget).readValue(updateNode);%0A    %7D%0A%7D%0A

Add failing test for #3338