@Test
    void verifyDeviceRemoval() {
        val username = "casuser-registered-device";
        for (var i = 0; i < 4; i++) {
            val request = YubiKeyDeviceRegistrationRequest.builder()
                .username("casuser-registered-device")
                .token(OTP)
                .name(UUID.randomUUID().toString())
                .build();
            assertTrue(registerAccount(request));
            assertTrue(isYubiKeyRegisteredFor(request.getUsername(), null));
        }
        var account = getAccount(username);
        assertTrue(account.isPresent());
        assertFalse(account.get().getDevices().isEmpty());

        account.get().getDevices().forEach(device -> getYubiKeyAccountRegistry().delete(username, device.getId()));
        account = getAccount(username);
        assertTrue(account.get().getDevices().isEmpty());
    }
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