@@ -0,0 +1,2988 @@
+package com.fasterxml.jackson.failing;%0A%0Aimport java.util.*;%0A%0Aimport com.fasterxml.jackson.annotation.JsonInclude;%0Aimport com.fasterxml.jackson.annotation.JsonPropertyOrder;%0Aimport com.fasterxml.jackson.databind.*;%0Aimport com.fasterxml.jackson.databind.json.JsonMapper;%0A%0Apublic class MapInclusion2573Test extends BaseMapTest%0A%7B%0A    @JsonPropertyOrder(%7B %22model%22, %22properties%22 %7D)%0A    static class Car%0A    %7B%0A        public String model;%0A        public Map%3CString, Integer%3E properties;%0A    %7D%0A%0A    /*%0A    /**********************************************************%0A    /* Test methods%0A    /**********************************************************%0A     */%0A%0A    private final Map%3CString, Integer%3E CAR_PROPERTIES = new LinkedHashMap%3C%3E();%0A    %7B%0A        CAR_PROPERTIES.put(%22Speed%22, 100);%0A        CAR_PROPERTIES.put(%22Weight%22, null);%0A    %7D%0A%0A    private final Car CAR = new Car();%0A    %7B%0A        CAR.model = %22F60%22;%0A        CAR.properties = CAR_PROPERTIES;%0A    %7D%0A%0A    private final JsonInclude.Value BOTH_NON_NULL = JsonInclude.Value.construct(JsonInclude.Include.NON_NULL,%0A            JsonInclude.Include.NON_NULL);%0A    %0A//    final private ObjectMapper MAPPER = objectMapper();%0A%0A    // %5Bdatabind#2572%5D%0A    public void test2572MapDefault() throws Exception%0A    %7B%0A                %0A        ObjectMapper mapper = JsonMapper.builder()%0A                .defaultPropertyInclusion(BOTH_NON_NULL)%0A                .build();%0A        assertEquals(aposToQuotes(%22%7B'Speed':100%7D%22),%0A                mapper.writeValueAsString(CAR_PROPERTIES));%0A        assertEquals(aposToQuotes(%22%7B'model':'F60','properties':%7B'Speed':100%7D%7D%22),%0A                mapper.writeValueAsString(CAR));%0A    %7D%0A%0A    // %5Bdatabind#2572%5D%0A    public void test2572MapOverrideUseDefaults() throws Exception%0A    %7B%0A        ObjectMapper mapper = JsonMapper.builder()%0A                .defaultPropertyInclusion(BOTH_NON_NULL)%0A                .build();%0A        mapper.configOverride(Map.class)%0A            .setInclude(JsonInclude.Value.construct(JsonInclude.Include.USE_DEFAULTS,%0A                    JsonInclude.Include.USE_DEFAULTS));%0A        assertEquals(aposToQuotes(%22%7B'Speed':100%7D%22),%0A                mapper.writeValueAsString(CAR_PROPERTIES));%0A        assertEquals(aposToQuotes(%22%7B'model':'F60','properties':%7B'Speed':100%7D%7D%22),%0A                mapper.writeValueAsString(CAR));%0A    %7D%0A%0A    // %5Bdatabind#2572%5D%0A    public void test2572MapOverrideInclAlways() throws Exception%0A    %7B%0A        ObjectMapper mapper = JsonMapper.builder()%0A                .defaultPropertyInclusion(BOTH_NON_NULL)%0A                .build();%0A        mapper.configOverride(Map.class)%0A            .setInclude(JsonInclude.Value.construct(JsonInclude.Include.ALWAYS,%0A                    JsonInclude.Include.ALWAYS));%0A        assertEquals(aposToQuotes(%22%7B'Speed':100,'Weight':null%7D%22),%0A                mapper.writeValueAsString(CAR_PROPERTIES));%0A        assertEquals(aposToQuotes(%22%7B'model':'F60','properties':%7B'Speed':100,'Weight':null%7D%7D%7D%22),%0A                mapper.writeValueAsString(CAR));%0A    %7D%0A%7D%0A

Add failing test for #2573