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