private static OAuth20AccessToken buildAccessToken(final ExpirationPolicy expirationPolicy,
                                                       final Authentication authentication) {
        val accessToken = mock(OAuth20AccessToken.class);
        when(accessToken.getId()).thenReturn("%s-%s".formatted(OAuth20AccessToken.PREFIX, UUID.randomUUID().toString()));
        when(accessToken.getAuthentication()).thenReturn(authentication);
        when(accessToken.getExpirationPolicy()).thenReturn(expirationPolicy);
        when(accessToken.getCreationTime()).thenReturn(ZonedDateTime.now(Clock.systemUTC()));
        when(accessToken.getScopes()).thenReturn(Set.of("scope1", "scope2", OidcConstants.StandardScopes.OPENID.getScope()));
        when(accessToken.getClientId()).thenReturn(UUID.randomUUID().toString());
        return accessToken;
    }
This is {@link HeimdallAuthorizationControllerTests}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-heimdall/src/test/java/org/apereo/cas/heimdall/HeimdallAuthorizationControllerTests.java