@Test
        void verify() throws Throwable {
            val id = UUID.randomUUID().toString();
            val mockRequest = getHttpRequestForEndpoint(OidcConstants.AUTHORIZE_URL);
            mockRequest.setMethod(HttpMethod.GET.name());
            mockRequest.setParameter(OAuth20Constants.CLIENT_ID, id);
            mockRequest.setParameter(OAuth20Constants.REDIRECT_URI, "https://oauth.example.org/");
            mockRequest.setParameter(OAuth20Constants.RESPONSE_TYPE, OAuth20ResponseTypes.TOKEN.name().toLowerCase(Locale.ENGLISH));
            mockRequest.setContextPath(StringUtils.EMPTY);
            val mockResponse = new MockHttpServletResponse();

            val oauthContext = oidcAuthorizeEndpointController.getConfigurationContext();
            oauthContext.getCasProperties().getAuthn().getOauth().getSessionReplication().getCookie().setAutoConfigureCookiePath(false);
            oauthContext.getOauthDistributedSessionCookieGenerator().setCookiePath(StringUtils.EMPTY);

            val service = getOidcRegisteredService(id);
            service.setBypassApprovalPrompt(true);
            servicesManager.save(service);

            val profile = new CasProfile();
            profile.setId("casuser");

            val sessionStore = oidcAuthorizeEndpointController.getConfigurationContext().getSessionStore();
            val context = new JEEContext(mockRequest, mockResponse);
            val ticket = new MockTicketGrantingTicket("casuser");
            oidcAuthorizeEndpointController.getConfigurationContext().getTicketRegistry().addTicket(ticket);
            profile.addAttribute(TicketGrantingTicket.class.getName(), ticket.getId());
            sessionStore.set(context, Pac4jConstants.USER_PROFILES,
                CollectionUtils.wrapLinkedHashMap(profile.getClientName(), profile));

            val modelAndView = oidcAuthorizeEndpointController.handleRequest(mockRequest, mockResponse);
            val view = modelAndView.getView();
            assertInstanceOf(RedirectView.class, view);
            val url = ((AbstractUrlBasedView) view).getUrl();
            assertTrue(url.startsWith("https://oauth.example.org/"));

            val fragment = new URIBuilder(url).getFragment();
            assertTrue(fragment.contains(OAuth20Constants.ACCESS_TOKEN));
            assertTrue(fragment.contains(OAuth20Constants.EXPIRES_IN));
            assertTrue(fragment.contains(OAuth20Constants.TOKEN_TYPE));
        }
This is {@link OidcAuthorizeEndpointControllerTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-oidc/src/test/java/org/apereo/cas/oidc/web/controllers/authorize/OidcAuthorizeEndpointControllerTests.java