@Test
    void verifyOperation() throws Throwable {
        assertEquals(0, oidcPushedAuthorizationRequestResponseBuilder.getOrder());

        val registeredService = getOidcRegisteredService();
        val profile = new CommonProfile();
        profile.setId("casuser");

        val holder = AccessTokenRequestContext.builder()
            .clientId(registeredService.getClientId())
            .service(RegisteredServiceTestUtils.getService())
            .authentication(RegisteredServiceTestUtils.getAuthentication("casuser",
                Map.of("customAttribute", List.of("CASUSER-ORIGINAL"))))
            .registeredService(registeredService)
            .grantType(OAuth20GrantTypes.AUTHORIZATION_CODE)
            .responseType(OAuth20ResponseTypes.CODE)
            .userProfile(profile)
            .build();

        var authzRequest = OAuth20AuthorizationRequest.builder()
            .clientId(registeredService.getClientId())
            .url(OidcConstants.PUSHED_AUTHORIZE_URL)
            .grantType(OAuth20GrantTypes.AUTHORIZATION_CODE.getType())
            .responseType(OAuth20ResponseTypes.CODE.getType())
            .build();

        assertTrue(oidcPushedAuthorizationRequestResponseBuilder.supports(authzRequest));
        val mv = oidcPushedAuthorizationRequestResponseBuilder.build(holder);
        assertTrue(mv.getModel().containsKey(OAuth20Constants.EXPIRES_IN));
        val uri = mv.getModel().get(OidcConstants.REQUEST_URI).toString();
        var ticket = ticketRegistry.getTicket(uri, OidcPushedAuthorizationRequest.class);
        assertNotNull(ticket);

        val request = new MockHttpServletRequest();
        request.setRequestURI('/' + OidcConstants.PUSHED_AUTHORIZE_URL);
        val response = new MockHttpServletResponse();
        var context = new JEEContext(request, response);

        authzRequest = oidcPushedAuthorizationRequestResponseBuilder.toAuthorizationRequest(context,
            holder.getAuthentication(), holder.getService(), holder.getRegisteredService()).get().build();
        assertNotNull(authzRequest);
        assertFalse(authzRequest.isSingleSignOnSessionRequired());

        request.addParameter(OidcConstants.REQUEST_URI, uri);

        val authn = RegisteredServiceTestUtils.getAuthentication("casuser",
            Map.of("customAttribute", List.of("CASUSER-TGT")));
        val tgt = new MockTicketGrantingTicket(authn);
        ticketRegistry.addTicket(tgt);

        val cookie = ticketGrantingTicketCookieGenerator.addCookie(request, response, tgt.getId());
        request.setCookies(cookie);

        context = new JEEContext(request, response);
        authzRequest = oidcPushedAuthorizationRequestResponseBuilder.toAuthorizationRequest(context,
            holder.getAuthentication(), holder.getService(), holder.getRegisteredService()).get().build();
        val accessTokenRequest = authzRequest.getAccessTokenRequest();
        assertTrue(authzRequest.isSingleSignOnSessionRequired());
        assertNotNull(accessTokenRequest.getAuthentication());
        assertNotNull(accessTokenRequest.getRegisteredService());
        assertNotNull(accessTokenRequest.getResponseType());
        assertNotNull(accessTokenRequest.getGrantType());
        assertNotNull(accessTokenRequest.getTicketGrantingTicket());
        val customAttribute = accessTokenRequest.getAuthentication().getAttributes().get("customAttribute");
        assertEquals(List.of("CASUSER-TGT", "CASUSER-ORIGINAL"), customAttribute);
        assertThrows(InvalidTicketException.class, () -> ticketRegistry.getTicket(uri, OidcPushedAuthorizationRequest.class));
    }
This is {@link OidcPushedAuthorizationRequestUriResponseBuilderTests}.

@author Misagh Moayyed
@since 6.5.0
support/cas-server-support-oidc/src/test/java/org/apereo/cas/oidc/ticket/OidcPushedAuthorizationRequestUriResponseBuilderTests.java