@Test
    void verifyOperation() throws Throwable {
        val context = MockRequestContext.create(applicationContext);
        assertEquals(CasWebflowConstants.TRANSITION_ID_ERROR, googleValidateSelectedRegistrationAction.execute(context).getId());

        val acct = OneTimeTokenAccount.builder()
            .username(UUID.randomUUID().toString())
            .name(UUID.randomUUID().toString())
            .secretKey("secret")
            .validationCode(123456)
            .scratchCodes(List.of())
            .build();
        MultifactorAuthenticationWebflowUtils.putOneTimeTokenAccount(context, acct);
        assertEquals(CasWebflowConstants.TRANSITION_ID_ERROR, googleValidateSelectedRegistrationAction.execute(context).getId());

        WebUtils.putCredential(context, new GoogleAuthenticatorTokenCredential("token", 987655L));
        assertEquals(CasWebflowConstants.TRANSITION_ID_ERROR, googleValidateSelectedRegistrationAction.execute(context).getId());

        WebUtils.putCredential(context, new GoogleAuthenticatorTokenCredential("token", acct.getId()));
        assertNull(googleValidateSelectedRegistrationAction.execute(context));
    }
This is {@link GoogleAuthenticatorValidateSelectedRegistrationActionTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-gauth/src/test/java/org/apereo/cas/gauth/web/flow/GoogleAuthenticatorValidateSelectedRegistrationActionTests.java