ForwardingClientHttpResponse extends ForwardingObject implements ClientHttpResponse { @Override public void close() { delegate().close(); }  @Override void close(); @Override int getRawStatusCode(); @Override HttpStatus getStatusCode(); @Override String getStatusText(); @Override InputStream getBody(); @Override HttpHeaders getHeaders();  }
@Test void shouldDelegateClose() { final ClientHttpResponse response = mock(ClientHttpResponse.class); final ForwardingClientHttpResponse unit = new ForwardingClientHttpResponse() { @Override protected ClientHttpResponse delegate() { return response; } }; unit.close(); verify(response).close(); }