Thread.sleep(5500);
/* if there is no MoSKito WebUI embedded in your application, stats can be accessed in a way like this */
IProducerRegistryAPI registryAPI = new ProducerRegistryAPIFactory().createProducerRegistryAPI();
OnDemandStatsProducer<EhcacheStats> producer = (OnDemandStatsProducer<EhcacheStats>) registryAPI.getProducer("browser-cache");
EhcacheStats stats = producer.getStats("cumulated");
System.out.println(stats.toStatsString(null, TimeUnit.MILLISECONDS));
/* first 100 accesses will not result in hits because we don't have this pages in cache yet */
assertEquals(9900, stats.getHits().getValueAsLong());
}