@ParameterizedTest
    @MethodSource("codeProvider")
    void verifyOperation(final Service service, final Authentication authentication,
                         final Set scopes, final String clientId, final OAuth20ResponseTypes responseType,
                         final OAuth20GrantTypes grantType) throws Throwable {
        val registeredService = getRegisteredService("https://code.oauth.org", clientId, "secret-at");
        servicesManager.save(registeredService);
        val token = defaultRefreshTokenFactory.create(service, authentication, null, scopes,
            clientId, null, Map.of(), responseType, grantType);
        assertSame(OAuth20RefreshToken.class, oauth20RefreshTokenTicketCompactor.getTicketType());
        val compacted = oauth20RefreshTokenTicketCompactor.compact(token);
        assertNotNull(compacted);
        val result = (OAuth20RefreshToken) oauth20RefreshTokenTicketCompactor.expand(compacted);
        assertNotNull(result);
        assertEquals(result.getClientId(), token.getClientId());
        assertEquals(result.getScopes(), token.getScopes());
        assertEquals(result.getResponseType(), token.getResponseType());
        assertEquals(result.getGrantType(), token.getGrantType());
        assertEquals(result.getAuthentication().getPrincipal(), token.getAuthentication().getPrincipal());
    }
This is {@link OAuth20RefreshTokenCompactorTests}.

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