### Question:
CamundaClient { public ResponseEntity<String> post(String camundaReqXML, String requestId, String requestTimeout, String schemaVersion, String serviceInstanceId, String action, String orchestrationURI) throws ApiException { String jsonReq = wrapRequest(camundaReqXML, requestId, serviceInstanceId, requestTimeout, schemaVersion, orchestrationURI); logger.info("Camunda Request Content: {}", jsonReq); return post(jsonReq, orchestrationURI); }  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 postClientConnectionExceptionTest() throws ApiException, IOException { String jsonReq = inputStream("/WrappedVIDRequest.json"); doThrow(ResourceAccessException.class).when(restTemplate).postForEntity(eq("http: any(HttpEntity.class), eq(String.class)); thrown.expect(ClientConnectionException.class); thrown.expectMessage("Client from http: client.post(jsonReq, "/path"); }
@Test public void postHttpStatusCodeExceptionTest() throws ApiException, IOException { HttpServerErrorException e = new HttpServerErrorException(HttpStatus.NOT_FOUND); String jsonReq = inputStream("/WrappedVIDRequest.json"); doThrow(e).when(restTemplate).postForEntity(eq("http: eq(String.class)); thrown.expect(BPMNFailureException.class); thrown.expectMessage("Request Failed due to BPEL error with HTTP Status = 404 NOT_FOUND"); client.post(jsonReq, "/path"); }