@PublicEvolving public class PojoTestUtils extends Object
| Constructor and Description |
|---|
PojoTestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
assertSerializedAsPojo(Class<T> clazz)
Verifies that instances of the given class fulfill all conditions to be serialized with the
PojoSerializer, as documented here. |
static <T> void |
assertSerializedAsPojoWithoutKryo(Class<T> clazz)
Verifies that instances of the given class fulfill all conditions to be serialized with the
PojoSerializer, as documented here,
without any field being serialized with Kryo. |
public static <T> void assertSerializedAsPojo(Class<T> clazz) throws AssertionError
PojoSerializer, 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.
T - class typeclazz - class to analyzeAssertionError - if instances of the class cannot be serialized as a POJOpublic static <T> void assertSerializedAsPojoWithoutKryo(Class<T> clazz) throws AssertionError
PojoSerializer, as documented here,
without any field being serialized with Kryo.T - class typeclazz - class to analyzeAssertionError - if instances of the class cannot be serialized as a POJO or required
Kryo for one or more fieldsCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.