Class EventingTestKit.MessageBuilder

Object
kalix.javasdk.testkit.EventingTestKit.MessageBuilder
Enclosing interface:
EventingTestKit

@ApiMayChange public static class EventingTestKit.MessageBuilder extends Object
  • Constructor Details

    • MessageBuilder

      public MessageBuilder(kalix.javasdk.impl.MessageCodec messageCodec)
  • Method Details

    • of

      public <T> EventingTestKit.Message<T> of(T payload, String subject)
      Create a message from a payload plus a subject (that is, the entity id). Automatically adds required default metadata for a CloudEvent.
      Type Parameters:
      T -
      Parameters:
      payload - the message payload
      subject - the entity id of which the message is concerned about
      Returns:
      a Message object to be used in the context of the Testkit
    • of

      public <T> EventingTestKit.Message<T> of(T payload, kalix.javasdk.Metadata metadata)
      Create a message object from a payload plus metadata.
      Type Parameters:
      T -
      Parameters:
      payload - the message payload
      metadata - the metadata associated with the message
      Returns:
      a Message object to be used in the context of the Testkit