### Question:
HasHeader extends TypeSafeMatcher<Response> { @Override public void describeTo(Description description) { description.appendText("Response with header named '" + name + "'"); } HasHeader(String name); @Override void describeTo(Description description);  }### Answer:
@Test public void matcherShouldDescribeItselfCorrectly() { Description description = new StringDescription(); matcher.describeTo(description); assertThat(description.toString(), is("Response with header named 'Header'")); }