@Test
    void verifyOperation() throws Throwable {
        val account = OneTimeTokenAccount.builder()
            .username("casuser")
            .secretKey(UUID.randomUUID().toString())
            .validationCode(123456)
            .scratchCodes(List.of())
            .name(UUID.randomUUID().toString())
            .build();
        val repository = mock(OneTimeTokenCredentialRepository.class);
        when(repository.get(anyLong())).thenReturn(account);

        val action = new OneTimeTokenAccountConfirmSelectionRegistrationAction(repository);
        val context = MockRequestContext.create();
        context.setParameter(OneTimeTokenAccountConfirmSelectionRegistrationAction.REQUEST_PARAMETER_ACCOUNT_ID, String.valueOf(account.getId()));
        assertEquals(CasWebflowConstants.TRANSITION_ID_SUCCESS, action.execute(context).getId());
    }
This is {@link OneTimeTokenAccountConfirmSelectionRegistrationActionTests}.

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