Class MessagePredicate

java.lang.Object
org.springframework.integration.test.predicate.MessagePredicate
All Implemented Interfaces:
Predicate<Message<?>>

public class MessagePredicate extends Object implements Predicate<Message<?>>
Predicate to make assertions about message equality easier. Usage:
 
 &#064;Test
 public void testSomething() {
   Message<String> expected = ...;
   Message<String> result = ...;
   assertThat(result).matches(new MessagePredicate(expected));
 }
 
 
Since:
5.2
Author:
Artem Bilan
  • Constructor Details

    • MessagePredicate

      public MessagePredicate(Message<?> operand, String... ignoredHeaders)
  • Method Details