@BeforeEach
    void setup() {
        mvc = MockMvcBuilders
            .webAppContextSetup(webApplicationContext)
            .apply(springSecurity())
            .defaultRequest(get("/")
                .contextPath("/cas")
                .accept(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN)
                .contentType(MediaType.APPLICATION_JSON))
            .build();
    }
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