@Test
    void verifyBadRequest() throws Throwable {
        val request = new MockHttpServletRequest();
        RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request, new MockHttpServletResponse()));
        val service = strategy.resolveServiceFrom(RegisteredServiceTestUtils.getService("https://example.org"));
        assertNotNull(service);
        val httpRequest = (Map) service.getAttributes().get(Service.SERVICE_ATTRIBUTE_HTTP_REQUEST);
        assertTrue(httpRequest.containsKey("%s.requestURL".formatted(HttpServletRequest.class.getName())));
        assertTrue(httpRequest.containsKey("%s.localeName".formatted(HttpServletRequest.class.getName())));
        assertTrue(service.getAttributes().containsKey(CasProtocolConstants.PARAMETER_SERVICE));
    }
This is {@link OAuth20AuthenticationServiceSelectionStrategyTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/services/OAuth20AuthenticationServiceSelectionStrategyTests.java