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