private BaseRegisteredService createRegisteredService(final String id, final boolean hasSigningKey, final boolean hasEncryptionKey) {
            val registeredService = RegisteredServiceTestUtils.getRegisteredService(id);

            if (hasSigningKey) {
                registeredService.getProperties().put(
                    RegisteredServiceProperty.RegisteredServiceProperties.TOKEN_AS_SERVICE_TICKET_SIGNING_KEY.getPropertyName(),
                    new DefaultRegisteredServiceProperty().addValue("pR3Vizkn5FSY5xCg84cIS4m-b6jomamZD68C8ash-TlNmgGPcoLgbgquxHPoi24tRmGpqHgM4mEykctcQzZ-Xg"));
            }
            if (hasEncryptionKey) {
                registeredService.getProperties().put(
                    RegisteredServiceProperty.RegisteredServiceProperties.TOKEN_AS_SERVICE_TICKET_ENCRYPTION_KEY.getPropertyName(),
                    new DefaultRegisteredServiceProperty().addValue("0KVXaN-nlXafRUwgsr3H_l6hkufY7lzoTy7OVI5pN0E"));
                registeredService.getProperties().put(
                    RegisteredServiceProperty.RegisteredServiceProperties.TOKEN_AS_SERVICE_TICKET_ENCRYPTION_ALG.getPropertyName(),
                    new DefaultRegisteredServiceProperty().addValue(ContentEncryptionAlgorithmIdentifiers.AES_128_CBC_HMAC_SHA_256));
                servicesManager.save(registeredService);
            }
            return registeredService;
        }
This is {@link BaseJwtTokenTicketBuilderTests}.

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