protected OidcCibaRequest newCibaRequest(final OidcRegisteredService registeredService,
                                             final Principal principal) throws Throwable {
        val cibaRequestContext = CibaRequestContext.builder()
            .clientNotificationToken(UUID.randomUUID().toString())
            .clientId(registeredService.getClientId())
            .scope(Set.of(OidcConstants.StandardScopes.OPENID.getScope()))
            .userCode(UUID.randomUUID().toString())
            .principal(principal)
            .build();
        val cibaFactory = (OidcCibaRequestFactory) defaultTicketFactory.get(OidcCibaRequest.class);
        val cibaRequestId = cibaFactory.create(cibaRequestContext);
        ticketRegistry.addTicket(cibaRequestId);
        return cibaRequestId;
    }
This is {@link AbstractOidcTests}.

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