@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(); PredicateWithTracing instance = (useStaticFactory) ? withTracing(predicateMock) : new PredicateWithTracing(predicateMock); assertThat(instance.origPredicate).isSameAs(predicateMock); assertThat(instance.spanStackForExecution).isEqualTo(spanStackMock); assertThat(instance.mdcContextMapForExecution).isEqualTo(mdcInfoMock); }
public static <T> PredicateWithTracing<T> withTracing(Predicate<T> origPredicate) { return new PredicateWithTracing<>(origPredicate); }
PredicateWithTracing implements Predicate<T> { public static <T> PredicateWithTracing<T> withTracing(Predicate<T> origPredicate) { return new PredicateWithTracing<>(origPredicate); } }
PredicateWithTracing implements Predicate<T> { public static <T> PredicateWithTracing<T> withTracing(Predicate<T> origPredicate) { return new PredicateWithTracing<>(origPredicate); } PredicateWithTracing(Predicate<T> origPredicate);  PredicateWithTracing(Predicate<T> origPredicate,
                                Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  PredicateWithTracing(Predicate<T> origPredicate,
                                Deque<Span> spanStackForExecution,
                                Map<String, String> mdcContextMapForExecution); }
PredicateWithTracing implements Predicate<T> { public static <T> PredicateWithTracing<T> withTracing(Predicate<T> origPredicate) { return new PredicateWithTracing<>(origPredicate); } PredicateWithTracing(Predicate<T> origPredicate);  PredicateWithTracing(Predicate<T> origPredicate,
                                Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  PredicateWithTracing(Predicate<T> origPredicate,
                                Deque<Span> spanStackForExecution,
                                Map<String, String> mdcContextMapForExecution); static PredicateWithTracing<T> withTracing(Predicate<T> origPredicate); static PredicateWithTracing<T> withTracing(Predicate<T> origPredicate,
                                                          Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static PredicateWithTracing<T> withTracing(Predicate<T> origPredicate,
                                                          Deque<Span> spanStackForExecution,
                                                          Map<String, String> mdcContextMapForExecution); @Override boolean test(T o); }
PredicateWithTracing implements Predicate<T> { public static <T> PredicateWithTracing<T> withTracing(Predicate<T> origPredicate) { return new PredicateWithTracing<>(origPredicate); } PredicateWithTracing(Predicate<T> origPredicate);  PredicateWithTracing(Predicate<T> origPredicate,
                                Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  PredicateWithTracing(Predicate<T> origPredicate,
                                Deque<Span> spanStackForExecution,
                                Map<String, String> mdcContextMapForExecution); static PredicateWithTracing<T> withTracing(Predicate<T> origPredicate); static PredicateWithTracing<T> withTracing(Predicate<T> origPredicate,
                                                          Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static PredicateWithTracing<T> withTracing(Predicate<T> origPredicate,
                                                          Deque<Span> spanStackForExecution,
                                                          Map<String, String> mdcContextMapForExecution); @Override boolean test(T o);  }