From a4879d6eff01ddbb9abdd868a751af1c59fb8d13 Mon Sep 17 00:00:00 2001 From: saurabh-shetty <50320759+saurabh-shetty@users.noreply.github.com> Date: Mon, 27 Nov 2023 21:17:59 -0600 Subject: [PATCH] Fixed com.fasterxml.jackson.databind.node.TestConversions#testValueToTree (#4227) --- .../com/fasterxml/jackson/databind/node/TestConversions.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/fasterxml/jackson/databind/node/TestConversions.java b/src/test/java/com/fasterxml/jackson/databind/node/TestConversions.java index 582c194a0c..13442efca5 100644 --- a/src/test/java/com/fasterxml/jackson/databind/node/TestConversions.java +++ b/src/test/java/com/fasterxml/jackson/databind/node/TestConversions.java @@ -398,7 +398,7 @@ public void testValueToTree() throws Exception // Act & Assert String expected = "{\"event\":{\"id\":1,\"name\":\"foo\"}}"; - assertEquals(expected, wrapRootMapper.writeValueAsString(value)); - assertEquals(expected, wrapRootMapper.valueToTree(value).toString()); + assertEquals(wrapRootMapper.readValue(expected, Map.class), wrapRootMapper.readValue(wrapRootMapper.writeValueAsString(value), Map.class)); + assertEquals(wrapRootMapper.readValue(expected, Map.class), wrapRootMapper.readValue(wrapRootMapper.valueToTree(value).toString(), Map.class)); } }