@Test
    void verifyGet() throws Throwable {
        val casuser = getUsernameUnderTest();
        val repo = getRegistry("verifyGet");
        val acct = repo.get(casuser);
        assertTrue(acct.isEmpty());
        val acct2 = getAccount("verifyGet", casuser);
        val toSave = OneTimeTokenAccount.builder()
            .username(acct2.getUsername())
            .secretKey(acct2.getSecretKey())
            .validationCode(acct2.getValidationCode())
            .scratchCodes(acct2.getScratchCodes())
            .name(casuser)
            .build();
        repo.save(toSave);
        val acct3 = repo.get(casuser).iterator().next();
        assertNotNull(acct3, "Account not found");
        assertEquals(acct2.getUsername(), acct3.getUsername());
        assertEquals(acct2.getValidationCode(), acct3.getValidationCode());
        assertEquals(acct2.getSecretKey(), acct3.getSecretKey());
        assertEquals(acct2.getScratchCodes().stream().sorted().map(Number::intValue).collect(Collectors.toList()),
            acct3.getScratchCodes().stream().sorted().map(Number::intValue).collect(Collectors.toList()));
        repo.delete(acct3.getId());
    }
This is {@link BaseOneTimeTokenCredentialRepositoryTests}.

@author Timur Duehr
@since 6.0.0
support/cas-server-support-gauth/src/test/java/org/apereo/cas/gauth/credential/BaseOneTimeTokenCredentialRepositoryTests.java