public class PayloadAndHeaderMatcher extends org.hamcrest.BaseMatcher<Message<?>>
@Test
public void testSomething() {
Message<String> expected = ...;
Message<String> result = ...;
assertThat(result, sameExceptImmutableHeaders(expected));
}
@Factory
public static Matcher<Message<?>> sameExceptImmutableHeaders(Message<?> expected) {
return new PayloadAndHeaderMatcher(expected);
}
Modifier and Type | Method and Description |
---|---|
void |
describeTo(org.hamcrest.Description description) |
boolean |
matches(java.lang.Object arg) |
static org.hamcrest.Matcher<Message<?>> |
sameExceptIgnorableHeaders(Message<?> expected,
java.lang.String... ignoreKeys) |