@Test
    void verifyMonitor() {
        val health = hazelcastHealthIndicator.health();
        val status = health.getStatus();
        assertTrue(Arrays.asList(Status.UP, Status.OUT_OF_SERVICE).contains(status),
            () -> "Status should be UP or OUT_OF_SERVICE but was%s".formatted(status));

        val details = health.getDetails();
        assertTrue(details.containsKey("name"));

        details.values().stream()
            .filter(Map.class::isInstance)
            .map(Map.class::cast)
            .forEach(map -> {
                assertTrue(map.containsKey("size"));
                assertTrue(map.containsKey("capacity"));
                assertTrue(map.containsKey("evictions"));
                assertTrue(map.containsKey("percentFree"));
            });
        assertNotNull(hazelcastHealthIndicator.toString());
    }
This is {@link HazelcastHealthIndicatorTests}.

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