@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 ConsumerWithTracing(null))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> new ConsumerWithTracing(null, Pair.of(spanStackMock, mdcInfoMock)))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null, Pair.of(spanStackMock, mdcInfoMock)))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> new ConsumerWithTracing(null, spanStackMock, mdcInfoMock))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null, spanStackMock, mdcInfoMock))) .isInstanceOf(IllegalArgumentException.class); }
public static <T> ConsumerWithTracing<T> withTracing(Consumer<T> origConsumer) { return new ConsumerWithTracing<>(origConsumer); }
ConsumerWithTracing implements Consumer<T> { public static <T> ConsumerWithTracing<T> withTracing(Consumer<T> origConsumer) { return new ConsumerWithTracing<>(origConsumer); } }
ConsumerWithTracing implements Consumer<T> { public static <T> ConsumerWithTracing<T> withTracing(Consumer<T> origConsumer) { return new ConsumerWithTracing<>(origConsumer); } ConsumerWithTracing(Consumer<T> origConsumer);  ConsumerWithTracing(Consumer<T> origConsumer,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  ConsumerWithTracing(Consumer<T> origConsumer,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); }
ConsumerWithTracing implements Consumer<T> { public static <T> ConsumerWithTracing<T> withTracing(Consumer<T> origConsumer) { return new ConsumerWithTracing<>(origConsumer); } ConsumerWithTracing(Consumer<T> origConsumer);  ConsumerWithTracing(Consumer<T> origConsumer,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  ConsumerWithTracing(Consumer<T> origConsumer,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); static ConsumerWithTracing<T> withTracing(Consumer<T> origConsumer); static ConsumerWithTracing<T> withTracing(Consumer<T> origConsumer,
                                                         Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static ConsumerWithTracing<T> withTracing(Consumer<T> origConsumer,
                                                         Deque<Span> spanStackForExecution,
                                                         Map<String, String> mdcContextMapForExecution); @Override void accept(T t); }
ConsumerWithTracing implements Consumer<T> { public static <T> ConsumerWithTracing<T> withTracing(Consumer<T> origConsumer) { return new ConsumerWithTracing<>(origConsumer); } ConsumerWithTracing(Consumer<T> origConsumer);  ConsumerWithTracing(Consumer<T> origConsumer,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  ConsumerWithTracing(Consumer<T> origConsumer,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); static ConsumerWithTracing<T> withTracing(Consumer<T> origConsumer); static ConsumerWithTracing<T> withTracing(Consumer<T> origConsumer,
                                                         Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static ConsumerWithTracing<T> withTracing(Consumer<T> origConsumer,
                                                         Deque<Span> spanStackForExecution,
                                                         Map<String, String> mdcContextMapForExecution); @Override void accept(T t);  }