@Override
    public OneTimeTokenAccount get(final String username, final long id) {
        return lock.tryLock(() -> get(username).stream().filter(ac -> ac.getId() == id).findFirst().orElse(null));
    }
This is {@link InMemoryGoogleAuthenticatorTokenCredentialRepository}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-gauth-core/src/main/java/org/apereo/cas/gauth/credential/InMemoryGoogleAuthenticatorTokenCredentialRepository.java