### Question:
CamundaClient { public ResponseEntity<String> get(String url) throws ApiException { url = env.getRequiredProperty(CommonConstants.CAMUNDA_URL) + url; HttpEntity<?> requestEntity = new HttpEntity<>(setHeaders()); try { return restTemplate.exchange(url, HttpMethod.GET, requestEntity, String.class); } catch (HttpStatusCodeException e) { logger.error("Error returned from sending GET request to BPMN", e); throw createBPMNFailureException(e); } catch (ResourceAccessException e) { logger.error("Error sending GET to BPMN", e); ClientConnectionException clientException = new ClientConnectionException.Builder(url, HttpStatus.SC_BAD_GATEWAY, ErrorNumbers.SVC_NO_SERVER_RESOURCES).build(); throw clientException; } }  ResponseEntity<String> post(String camundaReqXML, String requestId, String requestTimeout,
            String schemaVersion, String serviceInstanceId, String action, String orchestrationURI); ResponseEntity<String> post(RequestClientParameter parameterObject, String orchestrationURI); ResponseEntity<String> get(String url); ResponseEntity<String> post(String jsonReq, String url);  }### Answer:
@Test public void getClientConnectionExceptionTest() throws ApiException { doThrow(ResourceAccessException.class).when(restTemplate).exchange(eq("http: eq(HttpMethod.GET), any(HttpEntity.class), eq(String.class)); thrown.expect(ClientConnectionException.class); thrown.expectMessage("Client from http: client.get("/path"); }
@Test public void getHttpStatusCodeExceptionTest() throws ApiException { HttpServerErrorException e = new HttpServerErrorException(HttpStatus.NOT_FOUND); doThrow(e).when(restTemplate).exchange(eq("http: any(HttpEntity.class), eq(String.class)); thrown.expect(BPMNFailureException.class); thrown.expectMessage("Request Failed due to BPEL error with HTTP Status = 404 NOT_FOUND"); client.get("/path"); }