@Test
    void verifyClientCredentials() {
        val creds = new OidcCredentials();
        creds.setCode("authcode");
        creds.setAccessToken(new BearerAccessToken("value", 0L, Scope.parse("oidc email")).toJSONObject());
        creds.setIdToken(ID_TOKEN);

        val oidcProfile = new OidcProfile();
        oidcProfile.setId("id");
        oidcProfile.setIdTokenString(creds.getIdToken());
        val clientCred = new ClientCredential(creds, "client", true, oidcProfile);

        val auth = DefaultAuthenticationBuilder
            .newInstance(RegisteredServiceTestUtils.getPrincipal())
            .addCredential(clientCred)
            .build();
        val ticket = new TicketGrantingTicketImpl(
            UUID.randomUUID().toString(),
            auth, NeverExpiresExpirationPolicy.INSTANCE);
        val content = tgtSerializer.toString(ticket);
        assertSame(tgtSerializer.getTypeToSerialize(), tgtSerializer.from(content).getClass());
    }
This is {@link DelegatedClientSerializationTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-pac4j-oidc/src/test/java/org/apereo/cas/support/pac4j/DelegatedClientSerializationTests.java