@Test
    void verifyDeviceNotTrusted() throws Throwable {
        val record = getMultifactorAuthenticationTrustRecord();
        record.setRecordDate(ZonedDateTime.now(ZoneOffset.UTC).minusSeconds(5));
        getMfaTrustEngine().save(record);

        val context = MockRequestContext.create(applicationContext);
        WebUtils.putServiceIntoFlowScope(context, RegisteredServiceTestUtils.getService());
        WebUtils.putRegisteredService(context, RegisteredServiceTestUtils.getRegisteredService("sample-service", Collections.emptyMap()));
        WebUtils.putAuthentication(CoreAuthenticationTestUtils.getAuthentication(record.getPrincipal()), context);
        assertEquals(CasWebflowConstants.TRANSITION_ID_NO, mfaVerifyTrustAction.execute(context).getId());
    }
This is {@link MultifactorAuthenticationVerifyTrustActionTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-trusted-mfa/src/test/java/org/apereo/cas/trusted/web/flow/MultifactorAuthenticationVerifyTrustActionTests.java