@Test
    void verifyTokensWithUniqueIdsSave() {
        val otp1 = getRandomOtp();
        val token = new GoogleAuthenticatorToken(otp1, userId);
        oneTimeTokenAuthenticatorTokenRepository.store(token);

        val otp2 = getRandomOtp();
        val token2 = new GoogleAuthenticatorToken(otp2, userId);
        oneTimeTokenAuthenticatorTokenRepository.store(token2);

        val t1 = oneTimeTokenAuthenticatorTokenRepository.get(userId, token.getToken());
        val t2 = oneTimeTokenAuthenticatorTokenRepository.get(userId, token2.getToken());

        assertTrue(t1.getId() > 0);
        assertTrue(t2.getId() > 0);
        assertNotEquals(t1.getId(), t2.getId());
        assertEquals(otp1, (int) t1.getToken());
    }
This is {@link BaseOneTimeTokenRepositoryTests}.

@author Timur Duehr
@since 6.0.0
support/cas-server-support-gauth-core/src/test/java/org/apereo/cas/gauth/token/BaseOneTimeTokenRepositoryTests.java