@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 ListenableFutureCallbackWithTracing(null))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> new ListenableFutureCallbackWithTracing(null, Pair.of(spanStackMock, mdcInfoMock)))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null, Pair.of(spanStackMock, mdcInfoMock)))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> new ListenableFutureCallbackWithTracing(null, spanStackMock, mdcInfoMock))) .isInstanceOf(IllegalArgumentException.class); assertThat(catchThrowable(() -> withTracing(null, spanStackMock, mdcInfoMock))) .isInstanceOf(IllegalArgumentException.class); }
public static <T> ListenableFutureCallbackWithTracing<T> withTracing(ListenableFutureCallback<T> origListenableFutureCallback) { return new ListenableFutureCallbackWithTracing<>(origListenableFutureCallback); }
ListenableFutureCallbackWithTracing implements ListenableFutureCallback<T> { public static <T> ListenableFutureCallbackWithTracing<T> withTracing(ListenableFutureCallback<T> origListenableFutureCallback) { return new ListenableFutureCallbackWithTracing<>(origListenableFutureCallback); } }
ListenableFutureCallbackWithTracing implements ListenableFutureCallback<T> { public static <T> ListenableFutureCallbackWithTracing<T> withTracing(ListenableFutureCallback<T> origListenableFutureCallback) { return new ListenableFutureCallbackWithTracing<>(origListenableFutureCallback); } ListenableFutureCallbackWithTracing(ListenableFutureCallback<T> origListenableFutureCallback);  ListenableFutureCallbackWithTracing(ListenableFutureCallback<T> origListenableFutureCallback,
                                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  ListenableFutureCallbackWithTracing(ListenableFutureCallback<T> origListenableFutureCallback,
                                               Deque<Span> spanStackForExecution,
                                               Map<String, String> mdcContextMapForExecution); }
ListenableFutureCallbackWithTracing implements ListenableFutureCallback<T> { public static <T> ListenableFutureCallbackWithTracing<T> withTracing(ListenableFutureCallback<T> origListenableFutureCallback) { return new ListenableFutureCallbackWithTracing<>(origListenableFutureCallback); } ListenableFutureCallbackWithTracing(ListenableFutureCallback<T> origListenableFutureCallback);  ListenableFutureCallbackWithTracing(ListenableFutureCallback<T> origListenableFutureCallback,
                                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  ListenableFutureCallbackWithTracing(ListenableFutureCallback<T> origListenableFutureCallback,
                                               Deque<Span> spanStackForExecution,
                                               Map<String, String> mdcContextMapForExecution); static ListenableFutureCallbackWithTracing<T> withTracing(ListenableFutureCallback<T> origListenableFutureCallback); static ListenableFutureCallbackWithTracing<T> withTracing(ListenableFutureCallback<T> origListenableFutureCallback,
                                                                         Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static ListenableFutureCallbackWithTracing<T> withTracing(ListenableFutureCallback<T> origListenableFutureCallback,
                                                                         Deque<Span> spanStackForExecution,
                                                                         Map<String, String> mdcContextMapForExecution); @Override @SuppressWarnings("deprecation") void onSuccess(T result); @Override @SuppressWarnings("deprecation") void onFailure(Throwable ex); }
ListenableFutureCallbackWithTracing implements ListenableFutureCallback<T> { public static <T> ListenableFutureCallbackWithTracing<T> withTracing(ListenableFutureCallback<T> origListenableFutureCallback) { return new ListenableFutureCallbackWithTracing<>(origListenableFutureCallback); } ListenableFutureCallbackWithTracing(ListenableFutureCallback<T> origListenableFutureCallback);  ListenableFutureCallbackWithTracing(ListenableFutureCallback<T> origListenableFutureCallback,
                                               Pair<Deque<Span>, Map<String, String>> originalThreadInfo);  ListenableFutureCallbackWithTracing(ListenableFutureCallback<T> origListenableFutureCallback,
                                               Deque<Span> spanStackForExecution,
                                               Map<String, String> mdcContextMapForExecution); static ListenableFutureCallbackWithTracing<T> withTracing(ListenableFutureCallback<T> origListenableFutureCallback); static ListenableFutureCallbackWithTracing<T> withTracing(ListenableFutureCallback<T> origListenableFutureCallback,
                                                                         Pair<Deque<Span>, Map<String, String>> originalThreadInfo); static ListenableFutureCallbackWithTracing<T> withTracing(ListenableFutureCallback<T> origListenableFutureCallback,
                                                                         Deque<Span> spanStackForExecution,
                                                                         Map<String, String> mdcContextMapForExecution); @Override @SuppressWarnings("deprecation") void onSuccess(T result); @Override @SuppressWarnings("deprecation") void onFailure(Throwable ex);  }