@Test
    void verifyOperation() {
        try (val webServer = new MockWebServer(HttpStatus.OK, "{\"success\": true}")) {
            webServer.start();
            val response = UUID.randomUUID().toString();
            val props = new GoogleRecaptchaProperties()
                .setSecret(response)
                .setVerifyUrl("http://localhost:%s".formatted(webServer.getPort()));
            val validator = new FriendlyCaptchaValidator(props);
            val request = new MockHttpServletRequest();
            request.addParameter(FriendlyCaptchaValidator.REQUEST_PARAM_FRIENDLY_CAPTCHA_RESPONSE, response);
            assertNotNull(validator.getRecaptchaResponse(request));
            assertTrue(validator.validate(response, "Mozilla"));
        }
    }
This is {@link FriendlyCaptchaValidatorTests}.

@author Jerome LELEU
@since 7.2.0
support/cas-server-support-captcha-core/src/test/java/org/apereo/cas/web/FriendlyCaptchaValidatorTests.java