@Test
    void verifyDefault() {
        val servicesManager = mock(ServicesManager.class);
        val argumentExtractor = mock(ArgumentExtractor.class);
        val source = new RegisteredServiceCorsConfigurationSource(casProperties,
            servicesManager, argumentExtractor);
        val request = new MockHttpServletRequest();
        request.addParameter(CasProtocolConstants.PARAMETER_SERVICE, "example");
        val config = source.getCorsConfiguration(request);

        val cors = casProperties.getHttpWebRequest().getCors();
        assertEquals(cors.getMaxAge(), config.getMaxAge());
        assertEquals(cors.getAllowHeaders(), config.getAllowedHeaders());
        assertEquals(cors.getAllowOrigins(), config.getAllowedOrigins());
        assertEquals(cors.getAllowOriginPatterns(), config.getAllowedOriginPatterns());
        assertEquals(cors.getAllowMethods(), config.getAllowedMethods());
        assertEquals(cors.getExposedHeaders(), config.getExposedHeaders());
        assertTrue(config.getAllowCredentials());
    }
This is {@link RegisteredServiceCorsConfigurationSourceTests}.

@author Misagh Moayyed
@since 6.4.0
core/cas-server-core-web/src/test/java/org/apereo/cas/web/RegisteredServiceCorsConfigurationSourceTests.java