@Override
    protected CacheStatistics[] getStatistics() {
        val list = mongoTemplate.getCollectionNames()
            .stream()
            .map(collection -> {
                val stats = mongoTemplate.executeCommand(new Document("collStats", collection));
                return new MongoDbCacheStatistics(stats, collection);
            })
            .toList();

        return list.toArray(CacheStatistics[]::new);
    }
This is {@link MongoDbHealthIndicator} where it attempts to collect statistics
on all mongodb instances configured inside CAS.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-mongo-monitor/src/main/java/org/apereo/cas/monitor/MongoDbHealthIndicator.java