@Test
    void verifySetAnExpireByKey() {
        var record = MultifactorAuthenticationTrustRecord.newInstance("casuser", "geography", "fingerprint");
        record = getMfaTrustEngine().save(record);
        assertNotNull(getMfaTrustEngine().get(record.getId()));
        
        val records = getMfaTrustEngine().get("casuser");
        assertEquals(1, records.size());
        getMfaTrustEngine().remove(records.stream().findFirst().get().getRecordKey());
        assertTrue(getMfaTrustEngine().get("casuser").isEmpty());
    }
This is {@link MongoDbMultifactorAuthenticationTrustStorageTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-trusted-mfa-mongo/src/test/java/org/apereo/cas/trusted/authentication/storage/MongoDbMultifactorAuthenticationTrustStorageTests.java