HttpSpanFactory { public static String getUserIdFromHttpServletRequest(HttpServletRequest servletRequest, List<String> userIdHeaderKeys) { if (servletRequest == null) return null; return HttpRequestTracingUtils.getUserIdFromRequestWithHeaders(new RequestWithHeadersServletAdapter(servletRequest), userIdHeaderKeys); } private  HttpSpanFactory(); static Span fromHttpServletRequest(HttpServletRequest servletRequest, List<String> userIdHeaderKeys); static String getUserIdFromHttpServletRequest(HttpServletRequest servletRequest, List<String> userIdHeaderKeys); static @Nullable String determineUriPathTemplate(@Nullable HttpServletRequest request); static @NotNull String getSpanName(@Nullable HttpServletRequest request);  }
@Test public void getUserIdFromHttpServletRequest_returns_null_if_passed_null_request() { String nullUserId = HttpSpanFactory.getUserIdFromHttpServletRequest(null, USER_ID_HEADER_KEYS); assertThat(nullUserId).isNull(); }