@Test
    void verifyRedirectByParam() throws Throwable {
        val request = new MockHttpServletRequest();
        request.addParameter(Pac4jConstants.DEFAULT_CLIENT_NAME_PARAMETER, "CasClient");
        request.addParameter("customParam", "customValue");
        val response = new MockHttpServletResponse();
        var view = controller.redirectResponseToFlow("CASClient", request, response);
        assertInstanceOf(RedirectView.class, view);
        assertTrue(new URIBuilder(((AbstractUrlBasedView) view).getUrl()).getQueryParams()
            .stream().anyMatch(valuePair -> valuePair.getName().equals(Pac4jConstants.DEFAULT_CLIENT_NAME_PARAMETER)));
        view = controller.postResponseToFlow("CASClient", request, response);
        assertInstanceOf(RedirectView.class, view);
        assertTrue(new URIBuilder(((AbstractUrlBasedView) view).getUrl()).getQueryParams()
            .stream().anyMatch(valuePair -> valuePair.getName().equals(Pac4jConstants.DEFAULT_CLIENT_NAME_PARAMETER)));
    }
This is {@link DefaultDelegatedAuthenticationNavigationControllerTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-pac4j-webflow/src/test/java/org/apereo/cas/web/DefaultDelegatedAuthenticationNavigationControllerTests.java