@Test
    void verifyCodesAndAccount() throws Throwable {
        val duoProps = casProperties.getAuthn().getMfa().getDuo().getFirst();
        val port = Integer.parseInt(StringUtils.remove(duoProps.getDuoApiHost(), "localhost:"));

        try (val webServer = new MockWebServer(true, port, new ClassPathResource("duoAdminApiResponse-bypassCodes.json"))) {
            webServer.start();
            val codes = duoSecurityAdminApiService.getDuoSecurityBypassCodesFor("DU3RP9I2WOC59VZX672N");
            assertFalse(codes.isEmpty());

            webServer.responseBodySupplier(() -> new ClassPathResource("duoAdminApiResponse-user.json"));
            val userAccount = duoSecurityAdminApiService.modifyDuoSecurityUserAccount(new DuoSecurityUserAccount("casuser"));
            assertFalse(userAccount.isEmpty());
            assertNotNull(userAccount.get().getPhone());
        }
    }
This is {@link DefaultDuoSecurityAdminApiServiceTests}.

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