### Question:
TraceeClientHttpRequestInterceptor implements ClientHttpRequestInterceptor { @Override public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { preRequest(request); final ClientHttpResponse response = execution.execute(request, body); postResponse(response); return response; } TraceeClientHttpRequestInterceptor();  TraceeClientHttpRequestInterceptor(String profile);  TraceeClientHttpRequestInterceptor(TraceeBackend backend, HttpHeaderTransport transportSerialization, String profile); @Override ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution);  }### Answer:
@Test public void testInterceptPropagatesContextToRequest() throws Exception { final HttpRequest request = new SimpleClientHttpRequestFactory().createRequest(URI.create("http: backend.put("inClientBeforeRequest", "true"); unit.intercept(request, payload, clientHttpRequestExecutionMock); verify(clientHttpRequestExecutionMock).execute(argThat(headers(hasEntry(TraceeConstants.TPIC_HEADER, "inClientBeforeRequest=true"))), any(byte[].class)); }
@Test public void testInterceptReadsContextFromClientResponse() throws Exception { final HttpRequest request = new SimpleClientHttpRequestFactory().createRequest(URI.create("http: unit.intercept(request, payload, clientHttpRequestExecutionMock); assertThat(backend.get("fromResponse"), is("true")); }