@Test
    void verifyAccessToEndpoints() throws Throwable {
        mvc.perform(get("/cas/actuator/beans")).andExpect(status().isOk());
        mvc.perform(get("/cas/actuator/conditions")).andExpect(status().isOk());

        mvc.perform(get("/cas/actuator/info")
                .with(httpBasic("casuser", "Mellon")))
            .andExpect(status().isForbidden());
        mvc.perform(get("/cas/actuator/info"))
            .andExpect(status().isUnauthorized());
        mvc.perform(get("/cas/actuator/env")
                .with(httpBasic("casuser", "Mellon")))
            .andExpect(status().isOk());
        mvc.perform(get("/cas/actuator/health").header("X-Forwarded-For", "196.1.1.0"))
            .andExpect(status().isOk());
        mvc.perform(get("/cas/actuator/health").header("X-Forwarded-For", "10.0.0.9"))
            .andExpect(status().isOk());
        mvc.perform(get("/cas/actuator/health").header("X-Forwarded-For", "172.16.55.9"))
            .andExpect(status().isOk());
        mvc.perform(get("/cas/actuator/health").header("X-Forwarded-For", "200.0.0.123"))
            .andExpect(status().isOk());
        mvc.perform(get("/cas/actuator/health").header("X-Forwarded-For", "192.168.0.1"))
            .andExpect(status().isUnauthorized());

        mvc.perform(get("/cas/actuator/health")).andExpect(status().isUnauthorized());
        mvc.perform(get("/cas/custom")).andExpect(status().isUnauthorized());
    }
This is {@link CasWebSecurityConfigurerAdapterWebTests}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-webconfig/src/test/java/org/apereo/cas/web/security/CasWebSecurityConfigurerAdapterWebTests.java