SpacRocket commented on code in PR #13382:
URL: https://github.com/apache/kafka/pull/13382#discussion_r1141472817


##########
clients/src/test/java/org/apache/kafka/common/serialization/SerializationTest.java:
##########
@@ -389,4 +389,29 @@ public void testByteBufferSerializer() {
             assertArrayEquals(bytes, serializer.serialize(topic, 
directBuffer1));
         }
     }
+
+    @Test
+    public void testBooleanSerializer() {
+        byte[] testData = new byte[1];
+        testData[0] = (byte) 1;
+
+        Serde<Boolean> booleanSerde = Serdes.Boolean();
+        assertArrayEquals(testData, booleanSerde.serializer().serialize(topic, 
true));
+    }
+
+    @Test
+    public void testBooleanDeserializer() {
+        byte[] testData = new byte[1];
+        testData[0] = (byte) 1;
+
+        Serde<Boolean> booleanSerde = Serdes.Boolean();
+        assertEquals(true, booleanSerde.deserializer().deserialize(topic, 
testData));
+    }
+
+    @Test
+    public void booleanDeserializerShouldThrowOnNotNullValues() {

Review Comment:
   Thank you for all suggestions. I've written a ParametrizedTest for 
Deserializer too, and in that case I've started to get warnings. The discussion 
about it is below.



-- 
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