Search in sources :

Example 6 with ClientRequestContextWrapper

use of brave.jaxrs2.TracingClientFilter.ClientRequestContextWrapper in project brave by openzipkin.

the class ClientRequestContextWrapperTest method putHeader.

@Test
public void putHeader() {
    MultivaluedMap<String, Object> headers = new Headers<>();
    when(request.getHeaders()).thenReturn(headers);
    new ClientRequestContextWrapper(request).header("name", "value");
    assertThat(headers).containsExactly(entry("name", Collections.singletonList("value")));
}
Also used : Headers(org.jboss.resteasy.core.Headers) ClientRequestContextWrapper(brave.jaxrs2.TracingClientFilter.ClientRequestContextWrapper) Test(org.junit.Test)

Aggregations

ClientRequestContextWrapper (brave.jaxrs2.TracingClientFilter.ClientRequestContextWrapper)6 Test (org.junit.Test)6 Headers (org.jboss.resteasy.core.Headers)1