@Test
        void verifyTokenGenerationWithoutCallbackService() throws Throwable {
            val request = new MockHttpServletRequest();
            val profile = new CommonProfile();
            profile.setClientName("OIDC");
            profile.setId(UUID.randomUUID().toString());
            request.setAttribute(Pac4jConstants.USER_PROFILES,
                CollectionUtils.wrapLinkedHashMap(profile.getClientName(), profile));

            val mfa = casProperties.getAuthn().getMfa();
            val authentication = CoreAuthenticationTestUtils.getAuthentication(profile.getId(),
                CollectionUtils.wrap(OAuth20Constants.STATE, List.of("some-state"),
                    OAuth20Constants.NONCE, List.of("some-nonce"),
                    mfa.getCore().getAuthenticationContextAttribute(), List.of("context-class"),
                    AuthenticationHandler.SUCCESSFUL_AUTHENTICATION_HANDLERS, List.of("Handler1")));

            val tgt = new MockTicketGrantingTicket(authentication);
            ticketRegistry.addTicket(tgt);
            
            val accessToken = buildAccessToken(tgt);

            val registeredService = getOidcRegisteredService(UUID.randomUUID().toString(), randomServiceUrl());
            servicesManager.save(registeredService);

            val idTokenContext = IdTokenGenerationContext.builder()
                .accessToken(accessToken)
                .userProfile(profile)
                .responseType(OAuth20ResponseTypes.CODE)
                .grantType(OAuth20GrantTypes.NONE)
                .registeredService(registeredService)
                .build();
            val idToken = oidcIdTokenGenerator.generate(idTokenContext);
            assertNotNull(idToken);
        }
This is {@link OidcIdTokenGeneratorServiceTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-oidc/src/test/java/org/apereo/cas/oidc/token/OidcIdTokenGeneratorServiceTests.java