@Test
    void verifyLargeDataset() {
        val allAccounts = Stream.generate(
                () -> {
                    val username = UUID.randomUUID().toString();
                    var validationCode = RandomUtils.nextInt(1, 999999);
                    return OneTimeTokenAccount.builder()
                        .username(username)
                        .secretKey("secret")
                        .validationCode(validationCode)
                        .scratchCodes(CollectionUtils.wrapList(1, 2, 3, 4, 5, 6))
                        .name(UUID.randomUUID().toString())
                        .build();
                })
            .limit(1000);
        executedTimedOperation("Adding accounts", __ -> allAccounts.forEach(registry::save));
        executedTimedOperation("Getting accounts",
            Unchecked.consumer(__ -> {
                val accounts = registry.load();
                assertFalse(accounts.isEmpty());
            }));

        val accountsStream = executedTimedOperation("Getting accounts in bulk",
            Unchecked.supplier(() -> registry.load()));
        executedTimedOperation("Getting accounts individually",
            Unchecked.consumer(__ -> accountsStream.forEach(acct -> assertNotNull(registry.get(acct.getId())))));
        executedTimedOperation("Getting accounts individually for users",
            Unchecked.consumer(__ -> accountsStream.forEach(acct -> assertNotNull(registry.get(acct.getUsername())))));
    }
This is {@link RedisGoogleAuthenticatorTokenCredentialRepositoryTests}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-gauth-redis/src/test/java/org/apereo/cas/gauth/credential/RedisGoogleAuthenticatorTokenCredentialRepositoryTests.java