@@ -0,0 +1,2065 @@
+package com.fasterxml.jackson.failing;%0A%0Aimport java.io.IOException;%0Aimport java.util.*;%0A%0Aimport com.fasterxml.jackson.core.JsonGenerator;%0Aimport com.fasterxml.jackson.databind.*;%0Aimport com.fasterxml.jackson.databind.annotation.JsonSerialize;%0A%0Apublic class TestKeySerializers extends BaseMapTest%0A%7B%0A    public static class KarlSerializer extends JsonSerializer%3CString%3E%0A    %7B%0A        @Override%0A        public void serialize(String value, JsonGenerator jgen, SerializerProvider provider) throws IOException %7B%0A            jgen.writeFieldName(%22Karl%22);%0A        %7D%0A    %7D%0A%0A    public static class NotKarlBean%0A    %7B%0A        public Map%3CString,Integer%3E map = new HashMap%3CString,Integer%3E();%0A        %7B%0A            map.put(%22Not Karl%22, 1);%0A        %7D%0A    %7D%0A%0A    public static class KarlBean%0A    %7B%0A        @JsonSerialize(keyUsing = KarlSerializer.class)%0A        public Map%3CString,Integer%3E map = new HashMap%3CString,Integer%3E();%0A        %7B%0A            map.put(%22Not Karl%22, 1);%0A        %7D%0A    %7D%0A%0A    /*%0A    /**********************************************************%0A    /* Unit tests%0A    /**********************************************************%0A     */%0A    %0A    public void testNotKarl() throws IOException %7B%0A        final ObjectMapper mapper = new ObjectMapper();%0A        final String serialized = mapper.writeValueAsString(new NotKarlBean());%0A        assertEquals(%22%7B%5C%22map%5C%22:%7B%5C%22Not Karl%5C%22:1%7D%7D%22, serialized);%0A    %7D%0A%0A    public void testKarl() throws IOException %7B%0A        final ObjectMapper mapper = new ObjectMapper();%0A        final String serialized = mapper.writeValueAsString(new KarlBean());%0A        assertEquals(%22%7B%5C%22map%5C%22:%7B%5C%22Karl%5C%22:1%7D%7D%22, serialized);%0A    %7D%0A%0A    // %5BIssue#75%5D: caching of KeySerializers%0A    public void testBoth() throws IOException %7B%0A        final ObjectMapper mapper = new ObjectMapper();%0A        final String value1 = mapper.writeValueAsString(new NotKarlBean());%0A        assertEquals(%22%7B%5C%22map%5C%22:%7B%5C%22Not Karl%5C%22:1%7D%7D%22, value1);%0A        final String value2 = mapper.writeValueAsString(new KarlBean());%0A        assertEquals(%22%7B%5C%22map%5C%22:%7B%5C%22Karl%5C%22:1%7D%7D%22, value2);%0A    %7D%0A%7D%0A

Add a test for [Issue#75]