@Test
    void verifyMultipleDevices() throws Throwable {
        val credential = getGoogleAuthenticatorTokenCredential();
        for (var i = 0; i < 2; i++) {
            val toSave = GoogleAuthenticatorAccount.builder()
                .username("casuser")
                .name(String.format("deviceName-%s", i))
                .secretKey(account.getKey())
                .validationCode(account.getVerificationCode())
                .scratchCodes(new ArrayList<>(account.getScratchCodes()))
                .build();
            tokenCredentialRepository.save(toSave);
        }
        credential.setAccountId(null);
        assertThrows(PreventedException.class, () -> handler.authenticate(credential, mock(Service.class)));

        val oneAcct = tokenCredentialRepository.get("casuser").iterator().next();
        credential.setAccountId(oneAcct.getId());
        val result = handler.authenticate(credential, mock(Service.class));
        assertNotNull(result);
    }
This is {@link GoogleAuthenticatorAuthenticationHandlerTests}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-gauth-core/src/test/java/org/apereo/cas/gauth/GoogleAuthenticatorAuthenticationHandlerTests.java