### Question:
StringPatternMatches { public boolean hasNext() { for (Matcher matcher : matchers) { if (matcher != null) { return true; } } return false; } StringPatternMatches(final CharSequence input, final Collection<Pattern> patterns, final boolean discard); Matcher next(); boolean hasNext();  }### Answer:
@Test public void testWithNoMatchingMatchers() throws Exception { Pattern pattern = compile("c"); StringPatternMatches matches = new StringPatternMatches("aaab", asList(pattern), true); assertThat(matches.hasNext()).isFalse(); }