@Test
    void verifyCreateBypassCodes() throws Throwable {
        val endpoint = new DuoSecurityAdminApiEndpoint(casProperties, this.applicationContext);
        val data = Map.of("stat", "OK", "response", CollectionUtils.wrapList("123456"));
        val entity = MAPPER.writeValueAsString(data);
        try (val webServer = new MockWebServer(8443,
            new ByteArrayResource(entity.getBytes(StandardCharsets.UTF_8), "Output"), HttpStatus.OK)) {
            webServer.start();
            val result = endpoint.createBypassCodes(null, DuoSecurityMultifactorAuthenticationProperties.DEFAULT_IDENTIFIER, "mghfytgdq");
            assertFalse(result.isEmpty());
        }
    }
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