@Test
    void verifyOperation() throws Throwable {
        val context = MockRequestContext.create(applicationContext);
        val acct = GoogleAuthenticatorAccount
            .builder()
            .username(UUID.randomUUID().toString())
            .name(UUID.randomUUID().toString())
            .secretKey(UUID.randomUUID().toString())
            .validationCode(123456)
            .scratchCodes(List.of(987345))
            .build();
        googleAuthenticatorAccountRegistry.save(acct);
        WebUtils.putAuthentication(RegisteredServiceTestUtils.getAuthentication(acct.getUsername()), context);
        MultifactorAuthenticationWebflowUtils.putMultifactorAuthenticationProvider(context, dummyProvider);
        assertNull(action.execute(context));
        assertTrue(MultifactorAuthenticationWebflowUtils.isGoogleAuthenticatorMultipleDeviceRegistrationEnabled(context));
        assertNotNull(MultifactorAuthenticationWebflowUtils.getOneTimeTokenAccounts(context));
    }
This is {@link GoogleAuthenticatorPrepareLoginActionTests}.

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