@DataProvider(value = { "true", "false" }) @Test public void current_thread_info_constructor_sets_fields_as_expected(boolean useStaticFactory) { Tracer.getInstance().startRequestWithRootSpan("request-" + UUID.randomUUID().toString()); Deque<Span> spanStackMock = Tracer.getInstance().getCurrentSpanStackCopy(); Map<String, String> mdcInfoMock = MDC.getCopyOfContextMap(); BiFunctionWithTracing instance = (useStaticFactory) ? withTracing(biFunctionMock) : new BiFunctionWithTracing(biFunctionMock); assertThat(instance.origBiFunction).isSameAs(biFunctionMock); assertThat(instance.spanStackForExecution).isEqualTo(spanStackMock); assertThat(instance.mdcContextMapForExecution).isEqualTo(mdcInfoMock); }
public static <T, U, R> BiFunctionWithTracing<T, U, R> withTracing(BiFunction<T, U, R> origBiFunction) { return new BiFunctionWithTracing<>(origBiFunction); }
BiFunctionWithTracing implements BiFunction<T, U, R> { public static <T, U, R> BiFunctionWithTracing<T, U, R> withTracing(BiFunction<T, U, R> origBiFunction) { return new BiFunctionWithTracing<>(origBiFunction); } }
BiFunctionWithTracing implements BiFunction<T, U, R> { public static <T, U, R> BiFunctionWithTracing<T, U, R> withTracing(BiFunction<T, U, R> origBiFunction) { return new BiFunctionWithTracing<>(origBiFunction); } BiFunctionWithTracing(BiFunction<T, U, R> origBiFunction);  BiFunctionWithTracing(BiFunction<T, U, R> origBiFunction,
                                 Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  BiFunctionWithTracing(BiFunction<T, U, R> origBiFunction,
                                 Deque<Span> spanStackForExecution,
                                 Map<String, String> mdcContextMapForExecution); }
BiFunctionWithTracing implements BiFunction<T, U, R> { public static <T, U, R> BiFunctionWithTracing<T, U, R> withTracing(BiFunction<T, U, R> origBiFunction) { return new BiFunctionWithTracing<>(origBiFunction); } BiFunctionWithTracing(BiFunction<T, U, R> origBiFunction);  BiFunctionWithTracing(BiFunction<T, U, R> origBiFunction,
                                 Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  BiFunctionWithTracing(BiFunction<T, U, R> origBiFunction,
                                 Deque<Span> spanStackForExecution,
                                 Map<String, String> mdcContextMapForExecution); static BiFunctionWithTracing<T, U, R> withTracing(BiFunction<T, U, R> origBiFunction); static BiFunctionWithTracing<T, U, R> withTracing(
        BiFunction<T, U, R> origBiFunction,
        Pair<Deque<Span>, Map<String, String>> originalThreadInfo
    ); static BiFunctionWithTracing<T, U, R> withTracing(BiFunction<T, U, R> origBiFunction,
                                                                       Deque<Span> spanStackForExecution,
                                                                       Map<String, String> mdcContextMapForExecution); @Override R apply(T t, U u); }
BiFunctionWithTracing implements BiFunction<T, U, R> { public static <T, U, R> BiFunctionWithTracing<T, U, R> withTracing(BiFunction<T, U, R> origBiFunction) { return new BiFunctionWithTracing<>(origBiFunction); } BiFunctionWithTracing(BiFunction<T, U, R> origBiFunction);  BiFunctionWithTracing(BiFunction<T, U, R> origBiFunction,
                                 Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  BiFunctionWithTracing(BiFunction<T, U, R> origBiFunction,
                                 Deque<Span> spanStackForExecution,
                                 Map<String, String> mdcContextMapForExecution); static BiFunctionWithTracing<T, U, R> withTracing(BiFunction<T, U, R> origBiFunction); static BiFunctionWithTracing<T, U, R> withTracing(
        BiFunction<T, U, R> origBiFunction,
        Pair<Deque<Span>, Map<String, String>> originalThreadInfo
    ); static BiFunctionWithTracing<T, U, R> withTracing(BiFunction<T, U, R> origBiFunction,
                                                                       Deque<Span> spanStackForExecution,
                                                                       Map<String, String> mdcContextMapForExecution); @Override R apply(T t, U u);  }