### Question:
RecaptchaRestClient implements RecaptchaClient { public RecaptchaVerifyResponse call(final String captcha) { try { final URI url = captchaUri(captcha); return restTemplate.getForObject(url, RecaptchaVerifyResponse.class); } catch (Exception e) { throw CaptchaErrors.serviceFailure("Failed calling captcha verify", e); } } RecaptchaRestClient(final RestOperations restTemplate, final RecaptchaProperties config); RecaptchaVerifyResponse call(final String captcha);  }### Answer:
@Test void shouldHandleCaptchaValidMessage() throws IOException { mockOkMessage(okMessage()); final RecaptchaVerifyResponse verifyResponse = client.call(CAPTCHA); assertTrue(verifyResponse.isSuccess()); }
@Test void shouldHandleCaptchaFailedMessage() throws IOException { mockOkMessage(failedMessage()); final RecaptchaVerifyResponse verifyResponse = client.call(CAPTCHA); assertFalse(verifyResponse.isSuccess()); }
@Test void shouldHandleServerError() throws IOException { mockMessage(500, failedMessage()); assertThrows(CaptchaServiceException.class, () -> client.call(CAPTCHA)); }
@Test void shouldHandleConnectivityError() { wireMockServer.stop(); assertThrows(CaptchaServiceException.class, () -> client.call(CAPTCHA)); }
@Test void shouldHandleServerTimeout() { mockServerTimeout(); assertThrows(CaptchaServiceException.class, () -> client.call(CAPTCHA)); }