### Question:
SimpleMatcher extends CollectingMatcher<QueryMatch> { public SimpleMatcher(DocumentBatch docs) { super(docs); } SimpleMatcher(DocumentBatch docs); @Override QueryMatch resolve(QueryMatch match1, QueryMatch match2); static final MatcherFactory<QueryMatch> FACTORY; }### Answer:
@Test public void testSimpleMatcher() throws IOException, UpdateException { try (Monitor monitor = new Monitor(new LuceneQueryParser("field"), new MatchAllPresearcher())) { monitor.update(new MonitorQuery("1", "test"), new MonitorQuery("2", "wibble")); InputDocument doc1 = InputDocument.builder("doc1").addField("field", "test", new StandardAnalyzer()).build(); Matches<QueryMatch> matches = monitor.match(doc1, SimpleMatcher.FACTORY); assertThat(matches.matches("1", "doc1")).isNotNull(); } }