@Test
    void verifyAction() {
        val r = new OAuth20UserProfileDataAuditResourceResolver();
        val token = mock(OAuth20AccessToken.class);
        when(token.getId()).thenReturn("CODE");
        val webApplicationService = RegisteredServiceTestUtils.getService();
        when(token.getService()).thenReturn(webApplicationService);

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

        val jp = mock(JoinPoint.class);
        when(jp.getArgs()).thenReturn(new Object[]{token});

        val result = r.resolveFrom(jp, CollectionUtils.wrap(
            OAuth20UserProfileViewRenderer.MODEL_ATTRIBUTE_ID, "id",
            OAuth20Constants.CLIENT_ID, "clientid",
            CasProtocolConstants.PARAMETER_SERVICE, "service",
            "scopes", CollectionUtils.wrapSet("email"),
            "attributes", CollectionUtils.wrap("attributeName", "attributeValue")));
        assertTrue(result.length > 0);
    }
This is {@link OAuth20UserProfileDataAuditResourceResolverTests}.

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