@Test
    void verifyDuoDeviceManager() {
        try (val webServer = new MockWebServer(8443)) {
            webServer.responseBodySupplier(() -> new ClassPathResource("duoAdminApiResponse-user.json"));
            webServer.start();
            val id = casProperties.getAuthn().getMfa().getDuo().getFirst().getId();
            val provider = MultifactorAuthenticationUtils.getMultifactorAuthenticationProviderById(id, applicationContext)
                .map(DuoSecurityMultifactorAuthenticationProvider.class::cast)
                .orElseThrow();
            
            val principal = RegisteredServiceTestUtils.getPrincipal("casuser");
            val devices = provider.getDeviceManager().findRegisteredDevices(principal);
            assertEquals(1, devices.size());
            assertTrue(provider.getDeviceManager().hasRegisteredDevices(principal));
            
            provider.getDeviceManager().removeRegisteredDevice(principal, devices.getFirst().getId());
        }
    }
This is {@link DuoSecurityAdminApiEndpointTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-duo-core/src/test/java/org/apereo/cas/adaptors/duo/web/DuoSecurityAdminApiEndpointTests.java