@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 ThrowingCallable() { @Override public void call() throws Throwable { new CallableWithTracing(null); } })).isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(new ThrowingCallable() { @Override public void call() throws Throwable { withTracing(null); } })).isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(new ThrowingCallable() { @Override public void call() throws Throwable { new CallableWithTracing(null, Pair.of(spanStackMock, mdcInfoMock)); } })).isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(new ThrowingCallable() { @Override public void call() throws Throwable { withTracing(null, Pair.of(spanStackMock, mdcInfoMock)); } })).isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(new ThrowingCallable() { @Override public void call() throws Throwable { new CallableWithTracing(null, spanStackMock, mdcInfoMock); } })).isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(new ThrowingCallable() { @Override public void call() throws Throwable { withTracing(null, spanStackMock, mdcInfoMock); } })).isInstanceOf(IllegalArgumentException.class); }
public static <U> CallableWithTracing<U> withTracing(Callable<U> origCallable) { return new CallableWithTracing<>(origCallable); }
CallableWithTracing implements Callable<U> { public static <U> CallableWithTracing<U> withTracing(Callable<U> origCallable) { return new CallableWithTracing<>(origCallable); } }
CallableWithTracing implements Callable<U> { public static <U> CallableWithTracing<U> withTracing(Callable<U> origCallable) { return new CallableWithTracing<>(origCallable); } CallableWithTracing(Callable<U> origCallable);  CallableWithTracing(Callable<U> origCallable,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  CallableWithTracing(Callable<U> origCallable,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); }
CallableWithTracing implements Callable<U> { public static <U> CallableWithTracing<U> withTracing(Callable<U> origCallable) { return new CallableWithTracing<>(origCallable); } CallableWithTracing(Callable<U> origCallable);  CallableWithTracing(Callable<U> origCallable,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  CallableWithTracing(Callable<U> origCallable,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); static CallableWithTracing<U> withTracing(Callable<U> origCallable); static CallableWithTracing<U> withTracing(Callable<U> origCallable,
                                                         Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static CallableWithTracing<U> withTracing(Callable<U> origCallable,
                                                         Deque<Span> spanStackForExecution,
                                                         Map<String, String> mdcContextMapForExecution); @Override @SuppressWarnings("deprecation") U call(); }
CallableWithTracing implements Callable<U> { public static <U> CallableWithTracing<U> withTracing(Callable<U> origCallable) { return new CallableWithTracing<>(origCallable); } CallableWithTracing(Callable<U> origCallable);  CallableWithTracing(Callable<U> origCallable,
                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  CallableWithTracing(Callable<U> origCallable,
                               Deque<Span> spanStackForExecution,
                               Map<String, String> mdcContextMapForExecution); static CallableWithTracing<U> withTracing(Callable<U> origCallable); static CallableWithTracing<U> withTracing(Callable<U> origCallable,
                                                         Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static CallableWithTracing<U> withTracing(Callable<U> origCallable,
                                                         Deque<Span> spanStackForExecution,
                                                         Map<String, String> mdcContextMapForExecution); @Override @SuppressWarnings("deprecation") U call();  }