@Test
    void verifyAction() {
        val resolver = new OAuth20AccessTokenGrantRequestAuditResourceResolver();
        val token = mock(OAuth20Token.class);
        when(token.getId()).thenReturn("CODE");
        val tokenService = RegisteredServiceTestUtils.getService();
        val authentication = RegisteredServiceTestUtils.getAuthentication();
        when(token.getAuthentication()).thenReturn(authentication);

        val service = new OAuthRegisteredService();
        service.setClientId("CLIENTID");
        service.setName("OAUTH");
        service.setId(123);

        val holder = AccessTokenRequestContext.builder()
            .scopes(CollectionUtils.wrapSet("email"))
            .service(tokenService)
            .authentication(authentication)
            .registeredService(service)
            .grantType(OAuth20GrantTypes.AUTHORIZATION_CODE)
            .token(token)
            .redirectUri("https://oauth.example.org")
            .build();
        val result = AuditableExecutionResult.builder()
            .executionResult(holder)
            .build();
        assertTrue(resolver.resolveFrom(mock(JoinPoint.class), result).length > 0);
    }
This is {@link OAuth20AccessTokenGrantRequestAuditResourceResolverTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/web/audit/OAuth20AccessTokenGrantRequestAuditResourceResolverTests.java