Class DestinationTargetBuilder


  • public class DestinationTargetBuilder
    extends java.lang.Object
    A helper to be used in integration tests for creating and persisting DestinationTargetModel
    • Method Detail

      • destinationTarget

        public static DestinationTargetBuilder destinationTarget()
        Instantiates a new builder initialized to default state.
        Returns:
        new destination target builder
      • withId

        public DestinationTargetBuilder withId​(java.lang.String id)
        Specifies ID for the destination target to build.
        Parameters:
        id - identifier of the destination target to create. If the value is
        Returns:
        the builder with the ID specified
      • withDestinationChannel

        public DestinationTargetBuilder withDestinationChannel​(DestinationChannel channel)
        Specifies the destination channel for the destination target being built.
        Parameters:
        channel - destination channel to be used by the destination target. If the channel value is null or this method was not called, then the platform default channel will be used.
        Returns:
        a builder with the destination channel specified.
      • withRegistrationStatus

        public DestinationTargetBuilder withRegistrationStatus​(RegistrationStatus status)
        Specifies registration status for the destination target.
        Parameters:
        status - a status to be used by the destination target being built by this builder. If the value is null or this method was not called, then destination target will be created without the registration status.
        Returns:
        a builder with the registration status specified.
      • getDestinationTargetById

        public static java.util.Optional<DestinationTargetModel> getDestinationTargetById​(java.lang.String id)
        Looks up a destination target in the persistence storage.
        Parameters:
        id - ID of the destination target to find.
        Returns:
        an optional containing the matching destination target or Optional.empty(), if such destination target does not exist.