zentol commented on code in PR #19667:
URL: https://github.com/apache/flink/pull/19667#discussion_r867324992


##########
flink-core/src/test/java/org/apache/flink/api/java/typeutils/runtime/NullableSerializerTest.java:
##########
@@ -75,18 +63,37 @@ protected Integer[] getTestData() {
     }
 
     @Test
-    public void testWrappingNotNeeded() {
-        assertEquals(
-                NullableSerializer.wrapIfNullIsNotSupported(
-                        StringSerializer.INSTANCE, padNullValue),
-                StringSerializer.INSTANCE);
+    void testWrappingNotNeeded() {
+        assertThat(
+                        NullableSerializer.wrapIfNullIsNotSupported(
+                                StringSerializer.INSTANCE, 
isPaddingNullValue()))
+                .isEqualTo(StringSerializer.INSTANCE);
     }
 
     @Test
-    public void testWrappingNeeded() {
-        assertTrue(nullableSerializer instanceof NullableSerializer);
-        assertEquals(
-                
NullableSerializer.wrapIfNullIsNotSupported(nullableSerializer, padNullValue),
-                nullableSerializer);
+    void testWrappingNeeded() {
+        assertThat(nullableSerializer)
+                .isInstanceOf(NullableSerializer.class)
+                .isEqualTo(
+                        NullableSerializer.wrapIfNullIsNotSupported(
+                                nullableSerializer, isPaddingNullValue()));
+    }
+
+    abstract boolean isPaddingNullValue();
+
+    static final class NullableSerializerWithPaddingTest extends 
NullableSerializerTest {

Review Comment:
   This seemed like the easiest way to re-implement the parameterization.



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