private OAuth20RefreshToken createRefreshToken(final Ticket ticketGrantingTicket, final OAuthRegisteredService registeredService) throws Throwable {
            return defaultRefreshTokenFactory.create(
                RegisteredServiceTestUtils.getService(registeredService.getServiceId()),
                RegisteredServiceTestUtils.getAuthentication(),
                ticketGrantingTicket,
                Set.of("Scope1", "Scope2"), registeredService.getClientId(),
                "AT-1234567890", Map.of(),
                OAuth20ResponseTypes.CODE, OAuth20GrantTypes.AUTHORIZATION_CODE);
        }
This is {@link OAuth20DefaultRefreshTokenFactoryTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/ticket/refreshtoken/OAuth20DefaultRefreshTokenFactoryTests.java