cmccabe commented on code in PR #13363:
URL: https://github.com/apache/kafka/pull/13363#discussion_r1129857640


##########
clients/src/test/java/org/apache/kafka/common/protocol/MessageUtilTest.java:
##########
@@ -83,4 +90,31 @@ public void testConstants() {
         assertEquals(MessageUtil.UNSIGNED_SHORT_MAX, 0xFFFF);
         assertEquals(MessageUtil.UNSIGNED_INT_MAX, 0xFFFFFFFFL);
     }
+
+    @Test
+    public void testBinaryNode() throws IOException {
+        byte[] expected = new byte[] {5, 2, 9, 4, 1, 8, 7, 0, 3, 6};
+        StringWriter writer = new StringWriter();
+        ObjectMapper mapper = new ObjectMapper();
+
+        mapper.writeTree(mapper.createGenerator(writer), new 
BinaryNode(expected));
+
+        JsonNode binaryNode = mapper.readTree(writer.toString());
+
+        assertTrue(binaryNode.isTextual(), binaryNode.toString());

Review Comment:
   can you make the assertion failure message a little bit clearer? Just 
printing the node seems a bit cryptic.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to