@Test
    void verifyServiceAttributes() {
        val request = new MockHttpServletRequest();
        request.addParameter("p1", "v1");
        request.addParameter("p2", "v2");
        request.addParameter(CasProtocolConstants.PARAMETER_PASSWORD, "m$hf74621");
        request.addParameter(CasProtocolConstants.PARAMETER_SERVICE, "https://example.org?p3=v3&p4=v4");
        RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request, new MockHttpServletResponse()));
        val service = serviceFactory.createService(request);
        assertNotNull(service);
        assertEquals(6, service.getAttributes().size());

        assertTrue(service.getAttributes().containsKey("p1"));
        assertTrue(service.getAttributes().containsKey("p2"));
        assertTrue(service.getAttributes().containsKey("p3"));
        assertTrue(service.getAttributes().containsKey("p4"));

        val httpRequest = (Map) service.getAttributes().get("httpRequest");
        assertTrue(httpRequest.containsKey("%s.requestURL".formatted(HttpServletRequest.class.getName())));
        assertTrue(httpRequest.containsKey("%s.localeName".formatted(HttpServletRequest.class.getName())));
        
        assertFalse(service.getAttributes().containsKey(CasProtocolConstants.PARAMETER_PASSWORD));
    }
Test cases for {@link WebApplicationServiceFactory}.

@author Misagh Moayyed
@since 4.2
core/cas-server-core-services/src/test/java/org/apereo/cas/authentication/principal/WebApplicationServiceFactoryTests.java