@Test
    void verifyAccountRegistered() {
        val casuser = UUID.randomUUID().toString();
        val request1 = YubiKeyDeviceRegistrationRequest.builder().username("casuser2")
            .token(OTP).name(UUID.randomUUID().toString()).build();
        assertTrue(registerAccount(request1));

        val request2 = YubiKeyDeviceRegistrationRequest.builder().username(casuser)
            .token(OTP).name(UUID.randomUUID().toString()).build();
        assertTrue(registerAccount(request2));

        val request3 = YubiKeyDeviceRegistrationRequest.builder().username(casuser)
            .token("%s%s".formatted(OTP, OTP)).name(UUID.randomUUID().toString()).build();
        assertTrue(registerAccount(request3));

        assertTrue(isYubiKeyRegisteredFor(casuser, null));
        val account = getAccount(casuser);
        account.ifPresent(acct -> assertEquals(2, acct.getDevices().size()));

        getYubiKeyAccountRegistry().delete(casuser);
        assertTrue(getAccount(casuser).isEmpty());
        getYubiKeyAccountRegistry().deleteAll();
        assertEquals(0, getAccounts().size());
    }
This is {@link AbstractYubiKeyAccountRegistryTests}.

@author Timur Duehr
@since 6.0.0
support/cas-server-support-yubikey-core/src/test/java/org/apereo/cas/adaptors/yubikey/AbstractYubiKeyAccountRegistryTests.java