Package org.apache.flink.types
Class PojoTestUtils
java.lang.Object
org.apache.flink.types.PojoTestUtils
Test utils around POJOs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidassertSerializedAsPojo(Class<T> clazz) Verifies that instances of the given class fulfill all conditions to be serialized with thePojoSerializer, as documented here.static <T> voidassertSerializedAsPojoWithoutKryo(Class<T> clazz) Verifies that instances of the given class fulfill all conditions to be serialized with thePojoSerializer, as documented here, without any field being serialized with Kryo.
-
Constructor Details
-
PojoTestUtils
public PojoTestUtils()
-
-
Method Details
-
assertSerializedAsPojo
Verifies that instances of the given class fulfill all conditions to be serialized with thePojoSerializer, as documented here.Note that this check will succeed even if the Pojo is partially serialized with Kryo. If this is not desired, use
assertSerializedAsPojoWithoutKryo(Class)instead.- Type Parameters:
T- class type- Parameters:
clazz- class to analyze- Throws:
AssertionError- if instances of the class cannot be serialized as a POJO
-
assertSerializedAsPojoWithoutKryo
Verifies that instances of the given class fulfill all conditions to be serialized with thePojoSerializer, as documented here, without any field being serialized with Kryo.- Type Parameters:
T- class type- Parameters:
clazz- class to analyze- Throws:
AssertionError- if instances of the class cannot be serialized as a POJO or required Kryo for one or more fields
-