ContainsPattern extends TypesafeQuickMatcher<CharSequence> { public ContainsPattern(Pattern p, boolean match) { super(String.class); this.p = p; this.match = match; } ContainsPattern(Pattern p, boolean match);  ContainsPattern(Pattern p);  ContainsPattern(String regex, boolean match);  ContainsPattern(String regex); @Override void describeTo(Description description); @Factory static Matcher<CharSequence> containsPattern(String regex); @Factory static Matcher<CharSequence> containsPattern(Pattern p); @Factory static Matcher<CharSequence> matchesPattern(String regex); @Factory static Matcher<CharSequence> matchesPattern(Pattern p);  }
@Test public void test_mismatch_description() { final Matcher<CharSequence> hasPattern = containsPattern("no value"); assertThat(hasPattern, rejects("No value!", "\"No value!\" did not contain /no value/")); }