@Test
    void verifyRegistrationDisabled() throws Throwable {
        val account = buildAccount();
        val context = MockRequestContext.create(applicationContext);
        context.setParameter(OneTimeTokenAccountSaveRegistrationAction.REQUEST_PARAMETER_ACCOUNT_NAME, "ExampleAccount");
        WebUtils.putAuthentication(RegisteredServiceTestUtils.getAuthentication(account.getUsername()), context);
        context.getFlowScope().put(OneTimeTokenAccountCreateRegistrationAction.FLOW_SCOPE_ATTR_ACCOUNT, account);
        MultifactorAuthenticationWebflowUtils.putMultifactorDeviceRegistrationEnabled(context, false);
        assertEquals(CasWebflowConstants.TRANSITION_ID_ERROR, oneTimeTokenAccountSaveRegistrationAction.execute(context).getId());
    }
This is {@link OneTimeTokenAccountSaveRegistrationActionTests}.

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