@Test
    void verifyExpireByKey() {
        var record = MultifactorAuthenticationTrustRecord.newInstance(PRINCIPAL, GEOGRAPHY, DEVICE_FINGERPRINT);
        record = getMfaTrustEngine().save(record);
        assertNotNull(getMfaTrustEngine().get(record.getId()));
        
        record = MultifactorAuthenticationTrustRecord.newInstance(PRINCIPAL, GEOGRAPHY, DEVICE_FINGERPRINT);
        record = getMfaTrustEngine().save(record);
        assertNotNull(getMfaTrustEngine().get(record.getId()));

        val records = getMfaTrustEngine().get(PRINCIPAL);
        assertEquals(2, records.size());

        getMfaTrustEngine().remove(records.stream().findFirst().orElseThrow().getRecordKey());
        assertEquals(1, getMfaTrustEngine().get(PRINCIPAL).size());
        assertTrue(getMfaTrustEngine().isAvailable());
    }
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