@Test
    void verifyPushedAuthz() throws Throwable {
        val registeredService = getOidcRegisteredService(UUID.randomUUID().toString(), randomServiceUrl());
        servicesManager.save(registeredService);

        val profile = new CommonProfile();
        profile.setId("casTest");
        val holder = AccessTokenRequestContext.builder()
            .clientId(registeredService.getClientId())
            .service(RegisteredServiceTestUtils.getService())
            .authentication(RegisteredServiceTestUtils.getAuthentication())
            .registeredService(registeredService)
            .grantType(OAuth20GrantTypes.AUTHORIZATION_CODE)
            .responseType(OAuth20ResponseTypes.CODE)
            .userProfile(profile)
            .scopes(CollectionUtils.wrapSet(OidcConstants.StandardScopes.EMAIL.getScope(), OidcConstants.StandardScopes.PROFILE.getScope()))
            .build();
        val factory = (OidcPushedAuthorizationRequestFactory) defaultTicketFactory.get(OidcPushedAuthorizationRequest.class);
        val ticket = factory.create(holder);
        ticketRegistry.addTicket(ticket);

        val request = new MockHttpServletRequest();
        request.setRequestURI("https://cas.org/something/" + OidcConstants.AUTHORIZE_URL);
        request.addHeader(HttpHeaders.USER_AGENT, "MSIE");
        request.addParameter(OidcConstants.REQUEST_URI, ticket.getId());
        val response = new MockHttpServletResponse();
        val context = new JEEContext(request, response);

        val service = getOidcRegisteredService(UUID.randomUUID().toString(), randomServiceUrl());
        servicesManager.save(service);
        val mv = consentApprovalViewResolver.resolve(context, service);
        assertTrue(mv.hasView());
        assertEquals(3, ((Collection) mv.getModel().get("scopes")).size());
    }
This is {@link OidcConsentApprovalViewResolverTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-oidc/src/test/java/org/apereo/cas/oidc/web/OidcConsentApprovalViewResolverTests.java