@Test
    void verifyAction() {
        val r = new SamlResponseAuditResourceResolver();
        val response = mock(Response.class);
        val issuer = mock(Issuer.class);
        when(issuer.getValue()).thenReturn("https://idp.example.org");
        when(response.getIssuer()).thenReturn(issuer);
        when(response.getDestination()).thenReturn("https://sp.example.org");
        when(response.getID()).thenReturn("_123456789");

        var result = r.resolveFrom(mock(JoinPoint.class), response);
        assertNotNull(result);
        assertTrue(result.length > 0);
        assertTrue(result[0].contains("https://idp.example.org"));
        assertTrue(result[0].contains("https://sp.example.org"));
        assertTrue(result[0].contains("_123456789"));

        val envelope = mock(Envelope.class);
        val body = mock(Body.class);

        when(body.getUnknownXMLObjects()).thenReturn(CollectionUtils.wrapList(response));
        when(envelope.getBody()).thenReturn(body);
        result = r.resolveFrom(mock(JoinPoint.class), envelope);
        assertNotNull(result);
        assertTrue(result.length > 0);

        val fault = mock(Fault.class);
        val actor = mock(FaultActor.class);
        when(actor.getURI()).thenReturn("actor");
        val msg = mock(FaultString.class);
        when(msg.getValue()).thenReturn("message");
        when(fault.getMessage()).thenReturn(msg);
        when(fault.getActor()).thenReturn(actor);
        when(body.getUnknownXMLObjects()).thenReturn(CollectionUtils.wrapList(fault));
        result = r.resolveFrom(mock(JoinPoint.class), envelope);
        assertNotNull(result);
        assertTrue(result.length > 0);
    }
This is {@link SamlResponseAuditResourceResolverTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-saml-idp-web/src/test/java/org/apereo/cas/support/saml/web/idp/audit/SamlResponseAuditResourceResolverTests.java