RegexMatcher implements SearchMatcher { @Override public boolean matches(LogData logData) { return pattern.matcher(logData.getMessage()).find(); } RegexMatcher(final String regexToMatch); @Override boolean matches(LogData logData); @Override ArrayList<String> getFoundTextFragments(LogData logData);  }
@Test public void testMatches() { RegexMatcher matcher = new RegexMatcher(".*ma[\\s\\w]+,.*\\d"); assertTrue(matcher.matches(ld1)); assertFalse(matcher.matches(ld2)); }