CustomHttpBodyBuilder implements RequestBodyBuilder { @Override public HttpBody createHttpBody(String contentType, Charset characterEncoding) { return httpBody; } CustomHttpBodyBuilder(HttpBody httpBody); @Override HttpBody createHttpBody(String contentType, Charset characterEncoding);  }
@Test public void createHttpBodyShouldReturnProvidedBody() throws Exception { HttpBody httpBody = mock(HttpBody.class); CustomHttpBodyBuilder customHttpBodyBuilder = new CustomHttpBodyBuilder(httpBody); assertSame(httpBody, customHttpBodyBuilder.createHttpBody("contentType", Charset.defaultCharset())); }