@Test
    void verifyMonitor() {
        val health = mongoHealthIndicator.health();
        assertEquals(Status.UP, health.getStatus());
        val details = (Map) health.getDetails().get(MongoDbHealthIndicator.class.getSimpleName() + "-monitor");
        assertTrue(details.containsKey("name"));

        details.values().forEach(value -> {
            if (value instanceof final Map map) {
                assertTrue(map.containsKey("size"));
                assertTrue(map.containsKey("capacity"));
                assertTrue(map.containsKey("evictions"));
                assertTrue(map.containsKey("percentFree"));
                assertTrue(map.containsKey("state"));
            }
        });
    }
This is {@link MongoDbHealthIndicatorTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-mongo-monitor/src/test/java/org/apereo/cas/monitor/MongoDbHealthIndicatorTests.java