@Test
    void verifyCreate() throws Throwable {
        val casuser = getUsernameUnderTest();
        val acct = getAccount("verifyCreate", casuser);
        acct.setProperties(CollectionUtils.wrapList("prop1", "prop2"));
        assertNotNull(acct);
        val repo = getRegistry("verifyCreate");

        val toSave = OneTimeTokenAccount.builder()
            .username(acct.getUsername())
            .secretKey(acct.getSecretKey())
            .validationCode(acct.getValidationCode())
            .scratchCodes(acct.getScratchCodes())
            .name(casuser)
            .properties(acct.getProperties())
            .build();
        val stored = repo.save(toSave);
        assertNotNull(repo.get(stored.getId()));
        assertNotNull(repo.get(toSave.getUsername(), stored.getId()));
        assertEquals(1, repo.count());
        assertEquals(1, repo.count(stored.getUsername()));
        repo.delete(acct.getUsername());
        assertTrue(repo.load().isEmpty());
        assertEquals(0, repo.count());
        assertEquals(0, repo.count(stored.getUsername()));
    }
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