public final class PayloadAndHeaderMatcher<T> 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(Object arg) |
static <P> PayloadAndHeaderMatcher<P> |
sameExceptIgnorableHeaders(Message<P> expected,
String... ignoreKeys) |
public static <P> PayloadAndHeaderMatcher<P> sameExceptIgnorableHeaders(Message<P> expected, String... ignoreKeys)
public boolean matches(Object arg)
public void describeTo(org.hamcrest.Description description)