clesaec commented on code in PR #2529:
URL: https://github.com/apache/avro/pull/2529#discussion_r1342587937


##########
lang/java/avro/src/test/java/org/apache/avro/util/internal/TestJacksonUtils.java:
##########
@@ -102,4 +114,22 @@ void testToObject() {
     assertEquals("a", toObject(TextNode.valueOf("a"), 
SchemaBuilder.unionOf().stringType().and().intType().endUnion()));
   }
 
+  @ParameterizedTest
+  @MethodSource("nodes")
+  void cycle(JsonNode input) {
+    Object object = JacksonUtils.toObject(input);
+    JsonNode node = JacksonUtils.toJsonNode(object);
+    Assertions.assertEquals(input, node);
+  }
+
+  public static Stream<Arguments> nodes() {
+    ObjectNode o1 = JsonNodeFactory.instance.objectNode();
+    o1.put("intField", 123);

Review Comment:
   Any suggestion for another test case here ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to