private AuthnRequest signAuthnRequest(final HttpServletRequest request,
                                              final HttpServletResponse response,
                                              final AuthnRequest authnRequest) throws Throwable {
            val adaptor = SamlRegisteredServiceMetadataAdaptor
                .get(samlRegisteredServiceCachingMetadataResolver, samlRegisteredService,
                    samlRegisteredService.getServiceId()).get();
            return samlIdPObjectSigner.encode(authnRequest, samlRegisteredService,
                adaptor, response, request, SAMLConstants.SAML2_POST_BINDING_URI, authnRequest, new MessageContext());
        }
This is {@link SSOSamlIdPProfileCallbackHandlerControllerTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/web/idp/profile/sso/SSOSamlIdPProfileCallbackHandlerControllerTests.java