@Test
public void testProcess() throws Exception {

  HttpContext context = new BasicHttpContext();
  requestInterceptor.process(requestWithHeaders, context);
  assertThat(context.getAttribute("TRACE-CONTEXT")).isEqualTo(testContext);
  ArgumentCaptor<HttpRequest> captor = ArgumentCaptor.forClass(HttpRequest.class);
  verify(mockDelegate).process(captor.capture());
  HttpRequest request = captor.getValue();
  assertThat(request.getMethod()).isEqualTo("GET");
  assertThat(request.getProtocol()).isEqualTo("HTTP");
  assertThat(request.getURI()).isEqualTo(URI.create("http://example.com/foo/bar"));
  assertThat(request.getHeader("User-Agent")).isEqualTo("test-user-agent");
}