@Test
    void verifyGet() throws Throwable {
        val audit = new AuditActionContext("casuser", "resource", "action",
            "CAS", LocalDateTime.now(Clock.systemUTC()),
            new ClientInfo("123.456.789.000", "123.456.789.000", "GoogleChrome", "London"));
        val data = MAPPER.writeValueAsString(CollectionUtils.wrapSet(audit));

        val props = casProperties.getAudit().getRest();
        val port = URI.create(props.getUrl()).getPort();
        try (val webServer = new MockWebServer(port,
            new ByteArrayResource(data.getBytes(StandardCharsets.UTF_8)), HttpStatus.OK)) {
            webServer.start();
            assertTrue(webServer.isRunning());
            auditTrailManager.record(audit);

            val time = LocalDateTime.now(ZoneOffset.UTC).minusDays(2);
            val criteria = new HashMap<AuditTrailManager.WhereClauseFields, Object>();
            criteria.put(AuditTrailManager.WhereClauseFields.DATE, time);
            criteria.put(AuditTrailManager.WhereClauseFields.PRINCIPAL, "casuser");
            criteria.put(AuditTrailManager.WhereClauseFields.COUNT, "10");
            val results = auditTrailManager.getAuditRecords(criteria);
            assertFalse(results.isEmpty());
        }
    }
This is {@link RestAuditTrailManagerTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-audit-rest/src/test/java/org/apereo/cas/audit/RestAuditTrailManagerTests.java