@Test
    void verifyOperation() throws Throwable {
        val acct = GoogleAuthenticatorAccount.builder()
            .username(UUID.randomUUID().toString())
            .name(UUID.randomUUID().toString())
            .secretKey("secret")
            .validationCode(123456)
            .scratchCodes(List.of())
            .build();
        googleAuthenticatorAccountRegistry.save(acct);

        val context = MockRequestContext.create();

        WebUtils.putAuthentication(RegisteredServiceTestUtils.getAuthentication(acct.getUsername()), context);
        assertNull(googleAccountDeviceProviderAction.execute(context));
        val registeredDevices = MultifactorAuthenticationWebflowUtils.getMultifactorAuthenticationRegisteredDevices(context);
        assertEquals(1, registeredDevices.size());
        assertEquals("Google Authenticator", registeredDevices.iterator().next().getSource());
    }
This is {@link GoogleAuthenticatorAuthenticationDeviceProviderActionTests}.

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