@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 = defaultAccessTokenFactory.create(service,
            authentication, scopes, clientId, responseType, grantType);
        assertSame(OAuth20AccessToken.class, oauth20AccessTokenTicketCompactor.getTicketType());
        val compacted = oauth20AccessTokenTicketCompactor.compact(token);
        assertNotNull(compacted);
        val result = (OAuth20AccessToken) oauth20AccessTokenTicketCompactor.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 OAuth20AccessTokenCompactorTests}.

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