Github user mikaelstaldal commented on a diff in the pull request:

    https://github.com/apache/logging-log4j2/pull/124#discussion_r149195504
  
    --- Diff: 
log4j-api/src/test/java/org/apache/logging/log4j/message/MapMessageTest.java ---
    @@ -99,4 +102,29 @@ public void testMutableByDesign() { // LOG4J2-763
             final String expected2 = "{key1=\"value1\", key2=\"value2\", 
key3=\"value3\"}";
             assertEquals(expected2, result2);
         }
    +
    +    @Test
    +    public void testGetNonStringValue() {
    +        final String key = "Key";
    +        final MapMessage<?, Object> msg = new MapMessage<>()
    +                .with(key, 1L);
    +        assertEquals("1", msg.get(key));
    +    }
    +
    +    @Test
    +    public void testRemoveNonStringValue() {
    +        final String key = "Key";
    +        final MapMessage<?, Object> msg = new MapMessage<>()
    +                .with(key, 1L);
    +        assertEquals("1", msg.remove(key));
    +    }
    +
    +    @Test
    +    public void testJSONFormatNonStringValue() {
    --- End diff --
    
    Would be nice to test XML format of non-String value as well.


---

Reply via email to