@Test public void constructors_throw_exception_if_passed_null_operator() { final Deque<Span> spanStackMock = mock(Deque.class); final Map<String, String> mdcInfoMock = mock(Map.class); assertThat(catchThrowable(() -> new SupplierWithTracing(null))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> new SupplierWithTracing(null, Pair.of(spanStackMock, mdcInfoMock)))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null, Pair.of(spanStackMock, mdcInfoMock)))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> new SupplierWithTracing(null, spanStackMock, mdcInfoMock))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null, spanStackMock, mdcInfoMock))) .isInstanceOf(IllegalArgumentException.class); }
public static <U> SupplierWithTracing<U> withTracing(Supplier<U> origSupplier) { return new SupplierWithTracing<>(origSupplier); }
SupplierWithTracing implements Supplier<U> { public static <U> SupplierWithTracing<U> withTracing(Supplier<U> origSupplier) { return new SupplierWithTracing<>(origSupplier); } }
SupplierWithTracing implements Supplier<U> { public static <U> SupplierWithTracing<U> withTracing(Supplier<U> origSupplier) { return new SupplierWithTracing<>(origSupplier); } SupplierWithTracing(Supplier<U> origSupplier);  SupplierWithTracing(Supplier<U> origSupplier,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  SupplierWithTracing(Supplier<U> origSupplier,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); }
SupplierWithTracing implements Supplier<U> { public static <U> SupplierWithTracing<U> withTracing(Supplier<U> origSupplier) { return new SupplierWithTracing<>(origSupplier); } SupplierWithTracing(Supplier<U> origSupplier);  SupplierWithTracing(Supplier<U> origSupplier,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  SupplierWithTracing(Supplier<U> origSupplier,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); static SupplierWithTracing<U> withTracing(Supplier<U> origSupplier); static SupplierWithTracing<U> withTracing(Supplier<U> origSupplier,
                                                         Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static SupplierWithTracing<U> withTracing(Supplier<U> origSupplier,
                                                         Deque<Span> spanStackForExecution,
                                                         Map<String, String> mdcContextMapForExecution); @Override U get(); }
SupplierWithTracing implements Supplier<U> { public static <U> SupplierWithTracing<U> withTracing(Supplier<U> origSupplier) { return new SupplierWithTracing<>(origSupplier); } SupplierWithTracing(Supplier<U> origSupplier);  SupplierWithTracing(Supplier<U> origSupplier,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  SupplierWithTracing(Supplier<U> origSupplier,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); static SupplierWithTracing<U> withTracing(Supplier<U> origSupplier); static SupplierWithTracing<U> withTracing(Supplier<U> origSupplier,
                                                         Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static SupplierWithTracing<U> withTracing(Supplier<U> origSupplier,
                                                         Deque<Span> spanStackForExecution,
                                                         Map<String, String> mdcContextMapForExecution); @Override U get();  }