JsonRestClientImpl implements JsonRestClient { @Override public JsonNode post(final String url, final RestRequestBody requestBody, final RestRequestHeader... requestHeaders) throws JsonProcessingException, IOException { final ResponseEntity<String> response = restClient.post(url, String.class, requestBody, requestHeaders); return getJson(response); }  @Override JsonNode get(final String url, final RestRequestHeader... requestHeaders); @Override JsonNode post(final String url, final RestRequestBody requestBody, final RestRequestHeader... requestHeaders);  }
@Test public void testPost() throws UnsupportedEncodingException, IOException { setupExpectation(HttpMethod.POST); assertResponseOk(jsonRestClient.post(ANY_URL, RestRequestBody.of())); }