verifyNoMoreInteractions(mockHttpServletRequest);
}
private void mockHttpHeaders(final long traceid, final long spanId, final long parentSpanId, final String spanName,
final Boolean sampled) {
final HttpHeaders mockHttpHeaders = mock(HttpHeaders.class);
ClientRequest clientRequest = new ClientRequest("test");
RestEasyClientRequestAdapter request = new RestEasyClientRequestAdapter(clientRequest);
SpanId span;
if (sampled) {
span = mock(SpanId.class);
when(span.getTraceId()).thenReturn(traceid);
when(span.getSpanId()).thenReturn(spanId);
when(span.getParentSpanId()).thenReturn(parentSpanId);
} else {
span = null;
}
ClientRequestHeaders.addTracingHeaders(request, span, spanName);
when(mockHttpHeaders.getRequestHeaders()).thenReturn(clientRequest.getHeaders());
when(mockHttpRequest.getHttpHeaders()).thenReturn(mockHttpHeaders);
}