### Question:
EnhancedStatsCollector extends AbstractStatsCollector { public Stats getStats(Mustache mustache) { Checker.checkArgumentNotNull(mustache); ConcurrentMap<Long, ExecutionData> times = data.getIfPresent(mustache .getGeneratedId()); if (times != null) { return parseData(mustache.getName(), mustache.getGeneratedId(), times.values()); } return null; } EnhancedStatsCollector();  EnhancedStatsCollector(Predicate<String> templatePredicate,
            TimeUnit timeUnit); @Override void renderingStarted(MustacheRenderingEvent event); @Override void renderingFinished(MustacheRenderingEvent event); Stats getStats(Mustache mustache); Set<Stats> getStats(); Collection<ExecutionData> getRawData(Mustache mustache); void clearData(); static final String COMPUTING_CACHE_CONSUMER_ID; }### Answer:
@Test public void testCustomPredicate() { EnhancedStatsCollector collector = new EnhancedStatsCollector( (t) -> false, TimeUnit.DAYS); Mustache mustache = MustacheEngineBuilder.newBuilder() .addMustacheListener(collector).build() .compileMustache("qux", "Oops"); mustache.render(null); assertNull(collector.getStats(mustache)); }