@Test
    void verifyRetrieveAndExpireByDate() {
        val now = ZonedDateTime.now(ZoneOffset.UTC).truncatedTo(ChronoUnit.SECONDS);
        Stream.of(PRINCIPAL, PRINCIPAL2).forEach(p -> {
            for (var offset = 0; offset < 3; offset++) {
                val record = MultifactorAuthenticationTrustRecord.newInstance(p, GEOGRAPHY, DEVICE_FINGERPRINT);
                record.setRecordDate(now.minusDays(offset));
                record.setExpirationDate(DateTimeUtils.dateOf(now.plusDays(1)));
                getMfaTrustEngine().save(record);
            }
        });
        assertEquals(6, getMfaTrustEngine().get(now.minusDays(30)).size());
        assertEquals(2, getMfaTrustEngine().get(now.minusSeconds(1)).size());

        getMfaTrustEngine().remove(now.plusDays(10));
        assertTrue(getMfaTrustEngine().getAll().isEmpty());
    }
Test cases for {@link JpaMultifactorAuthenticationTrustStorage}.

@author Daniel Frett
@since 5.3.0
support/cas-server-support-trusted-mfa-jdbc/src/test/java/org/apereo/cas/trusted/authentication/storage/JpaMultifactorAuthenticationTrustStorageTests.java