@Test
    void verifyBypass() throws Throwable {
        val context = getMockRequestContext();
        val service = (BaseRegisteredService) WebUtils.getRegisteredService(context);
        val policy = new DefaultRegisteredServiceMultifactorPolicy();
        policy.setBypassTrustedDeviceEnabled(true);
        service.setMultifactorAuthenticationPolicy(policy);
        WebUtils.putRegisteredService(context, service);
        assertEquals(CasWebflowConstants.TRANSITION_ID_SUCCESS,
            mfaSetTrustAction.execute(context).getId());
    }
This is {@link MultifactorAuthenticationSetTrustActionTests}.

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