### Question:
EnhancedStatsCollector extends AbstractStatsCollector { public void clearData() { data.clear(); } 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 testClearData() { EnhancedStatsCollector collector = new EnhancedStatsCollector(); Mustache mustache = MustacheEngineBuilder.newBuilder() .addMustacheListener(collector).build() .compileMustache("bar", "BAR"); mustache.render(null); assertEquals(1, collector.getStats(mustache).getFinished()); collector.clearData(); assertNull(collector.getStats(mustache)); }