diff --git a/src/test/java/com/fasterxml/jackson/failing/KeySerializers1679Test.java b/src/test/java/com/fasterxml/jackson/failing/KeySerializers1679Test.java new file mode 100644 index 0000000000..095be8595d --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/failing/KeySerializers1679Test.java @@ -0,0 +1,25 @@ +package com.fasterxml.jackson.failing; + +import java.util.*; + +import com.fasterxml.jackson.databind.*; + +public class KeySerializers1679Test extends BaseMapTest +{ + /* + /********************************************************** + /* Unit tests + /********************************************************** + */ + + private final ObjectMapper MAPPER = new ObjectMapper(); + + // [databind#1679] + public void testRecursion1679() throws Exception + { + Map objectMap = new HashMap(); + objectMap.put(new Object(), new Object()); + String json = MAPPER.writeValueAsString(objectMap); + assertEquals("{}", json); + } +}