Class SerializationTestKit

java.lang.Object
org.apache.pekko.actor.testkit.typed.javadsl.SerializationTestKit

public class SerializationTestKit extends Object
Utilities to test serialization.
  • Constructor Details

    • SerializationTestKit

      public SerializationTestKit(ActorSystem<?> system)
  • Method Details

    • verifySerialization

      public <M> M verifySerialization(M obj, boolean assertEquality)
      Verify serialization roundtrip. Throws exception from serializer if obj can't be serialized and deserialized.

      Parameters:
      obj - the object to verify
      assertEquality - if true the deserialized object is verified to be equal to obj, and if not an AssertionError is thrown
      Returns:
      the deserialized object